sigx::const_trait< T_type & > Struct Template Reference
[Threadsafety]

Specialization for references to non-const types. More...

#include <const_trait.h>


Public Types

typedef const T_type & add
typedef T_type & remove


Detailed Description

template<typename T_type>
struct sigx::const_trait< T_type & >

Specialization for references to non-const types.

Specializations for references do not consider a reference as a "top level" type qualifer unlike pointers; therefore, they add or remove the volatileness to/from the referenced type: const_trait<int&>::add -> const int& const_trait<int&>::remove -> int& const_trait<const int&>::add -> const int& const_trait<const int&>::remove -> int&

( a different placing of the qualifier, same type: const_trait<int&>::add -> int const& const_trait<int&>::remove -> int& const_trait<int const&>::add -> int const& const_trait<int const&>::remove -> int& )

whereas pointers themselves are treated like "top level" type qualifiers. Hence, they add or remove the volatileness from the pointer type qualifier: const_trait<int*>::add -> const int* const_trait<int*>::remove -> int* const_trait<const int*>::add -> const int* const_trait<const int*>::remove -> int* const_trait<int* const>::add -> int* const const_trait<int* const>::remove -> int*

( a different placing of the qualifier, same type: const_trait<int*>::add -> int const* const_trait<int*>::remove -> int* const_trait<int const*>::add -> int const* const_trait<int const*>::remove -> int* const_trait<int* const>::add -> int* const const_trait<int* const>::remove -> int* )

This is a major difference to boost::type_traits that consider a reference as a top level type qualifier


Member Typedef Documentation

template<typename T_type >
typedef const T_type& sigx::const_trait< T_type & >::add

template<typename T_type >
typedef T_type& sigx::const_trait< T_type & >::remove


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

Generated on Wed Jan 28 21:38:00 2009 for sigx++ by  doxygen 1.5.8