HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_MakePtrConst.h File Reference

Go to the source code of this file.

Classes

struct  UT_MakePtrConst< V >
 
struct  UT_MakePtrConst< V * >
 

Detailed Description

UT_MakePtrConst adds const to a pointer.

For example, it will turn "int*" into "const int*"

NOTE: This template will NOT WORK for FUNCTION POINTER types. The previous incarnation of this code used hboost::mpl to handle this case but gcc 3.3.6 would periodically crash.

Usage:

typedef typename UT_MakePtrConst<int *>::type ConstIntPtr;

It is safe to use this when the pointer type argument is already const. In that case, the resulting type will be equivalent to the input type.

Definition in file UT_MakePtrConst.h.