X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fcml%2Fcore%2Fmeta%2Fcommon.h;h=08c129d295985b6f0af051b46fc8ba55e6c7b450;hp=6d9b8761b439ed689ce5eb5cac3050cf80286cc5;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hpb=0fffd0097d7b496454413e57b398c903ecc252e4 diff --git a/src/cml/core/meta/common.h b/src/cml/core/meta/common.h index 6d9b876..08c129d 100644 --- a/src/cml/core/meta/common.h +++ b/src/cml/core/meta/common.h @@ -80,6 +80,36 @@ template<> struct same_type { enum { is_true = true, is_false = false }; }; +/** Remove a reference qualifier from a type. */ +template struct remove_reference { + template struct helper { + typedef Q type; + }; + + template struct helper { + typedef Q type; + }; + + template struct helper { + typedef const Q type; + }; + + typedef typename helper::type type; +}; + +/** Remove a const qualifier from a type. */ +template struct remove_const { + template struct helper { + typedef Q type; + }; + + template struct helper { + typedef Q type; + }; + + typedef typename helper::type type; +}; + } // namespace cml #endif