diff options
Diffstat (limited to 'public/tier0/type_traits.h')
| -rw-r--r-- | public/tier0/type_traits.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/public/tier0/type_traits.h b/public/tier0/type_traits.h new file mode 100644 index 0000000..6459de4 --- /dev/null +++ b/public/tier0/type_traits.h @@ -0,0 +1,32 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: functionality that is provided in C++11 type_traits, which +// currently isn't supported by the OSX compiler. Sadness. +// +//============================================================================= +#pragma once + +template <class T> +struct V_remove_const +{ + typedef T type; +}; + +template <class T> +struct V_remove_const<const T> +{ + typedef T type; +}; + +template <class T> +struct V_remove_const<const T[]> +{ + typedef T type; +}; + +template <class T, unsigned int N> +struct V_remove_const<const T[N]> +{ + typedef T type; +}; + |