must_be_pod_or_void Union Template Reference
[Constraints Utility Library]

#include <stlsoft/util/constraints.hpp>

List of all members.

Detailed Description

template<typename T>
union stlsoft::must_be_pod_or_void< T >

Constraint to ensure that a type is a built-in or trivial type, or is void.

T The type to be constrained
This class can be used to constrain a type to be of either built-in, e.g. int, or of a trivial type, i.e. aggregate types or types with publicly accessible default contructors and assignment operators, or void.

It may be used as follows:

  typedef std::vector<int>  vec_t;

  stlsoft::must_be_pod_or_void<int*>();   // Ok
  stlsoft::must_be_pod_or_void<vec_t>();  // Compile error!
  stlsoft::must_be_pod_or_void<double>(); // Ok
  stlsoft::must_be_pod_or_void<void>();   // Ok

See also:

Public Types

typedef int(* func_ptr_type )()

Static Public Member Functions

static func_ptr_type constraint ()

Public Attributes

int i

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

Generated on Thu Jun 10 08:59:02 2010 for STLSoft by  doxygen 1.5.6