typename removeConst<T>::type is a type that is the non-const version of T. For normal classes, removeConst<T>::type is the same as T, but for T which is const, type is the non-const form. More...
#include <classTraits.h>
Public Types | |
| typedef isConstType< T >::type | type |
typename removeConst<T>::type is a type that is the non-const version of T. For normal classes, removeConst<T>::type is the same as T, but for T which is const, type is the non-const form.
The following templates, removeConst<T>, removeVolatile<T>, and removeCV<T> let you define a typedef based on some specified type BUT not having the const or volatile attributes. Use it like this:
template<class T>
void function(T t)
{
typedef typename removeCV<T>::type PlainOldT;
// use PlainOldT instead of T to eliminate annoying and unnecessary
// template specializations of T which have const or volatile attributes.
}
Definition at line 275 of file classTraits.h.
| typedef isConstType<T>::type type |
Definition at line 300 of file classTraits.h.
1.6.3