Skip to content

Instantly share code, notes, and snippets.

@2bbb
Created April 18, 2014 23:46
Show Gist options
  • Save 2bbb/11068781 to your computer and use it in GitHub Desktop.
Save 2bbb/11068781 to your computer and use it in GitHub Desktop.
pointer
#define Pointer(T) T *
#define ImmutableValuePointer(T) const T *
#define ImmutableAddressPointer(T) T * const
#define ImmutablePointer(T) const T * const
template <typename T>
class Pointer {
public:
typedef T *type;
typedef const T * immutableValue;
typedef T * const immutableAddress;
typedef const T * const immutableAll;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment