do_construction Struct Template Reference
[Containers Library]

#include <stlsoft/containers/util/array_policies.hpp>

List of all members.

Detailed Description

template<typename T>
struct stlsoft::do_construction< T >

Traits class that controls whether elements in STLSoft arrays are in-place constructed and destroyed.

T The type
The template's value is true, indicating that construction and destruction will be performed, but is false for the specialisations for integral and boolean types, indicating that no initialisation of the array elements will be performed.

You would customise as follows:

  struct YourPodType
    int x;
    int y;
    int z;

  namespace stlsoft
    template <>
    struct do_construction<YourPodType>
      enum { value = false }; // This will cause the array elements to not be initialised

  // Create a 2x3 2-dimensional array of YourPodType
  stlsoft::fixed_array_2d<YourPodType>  pods(2, 3);

See also:
stlsoft::fixed_array_1d | stlsoft::fixed_array_2d | stlsoft::fixed_array_3d | stlsoft::fixed_array_4d | stlsoft::static_array_1d | stlsoft::static_array_2d | stlsoft::static_array_3d | stlsoft::static_array_4d

Public Types

enum  { value = true }
typedef one_type type

Member Enumeration Documentation

anonymous enum

value  If true the array elements are constructed, otherwise they are not.

The documentation for this struct was generated from the following file:

Generated on Thu Jun 10 08:58:44 2010 for STLSoft by  doxygen 1.5.6