remove_const

Will remove the top level const (if present) from a type.

  typedef typename 
  remove_const<T>::type non_const_type;
Remarks

The resulting "non_const_type" will be the same as the input type T, except that if T is const qualified, that constant qualification will be removed.

Listing: Example of remove_const
typedef typename remove_const <const int>::type Int;
Int has type int.