typename removeVolatile<T>::type is a type that is the non-volatile version of T. For normal classes, removeVolatile<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 T | type |
typename removeVolatile<T>::type is a type that is the non-volatile version of T. For normal classes, removeVolatile<T>::type is the same as T, but for T which is const, type is the non-const form.
The following templates, removeVolatile<T>, removeConst<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 306 of file classTraits.h.
| typedef T type |
Definition at line 331 of file classTraits.h.
1.6.3