X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fcore%2Fmeta%2Fcommon.h;h=08c129d295985b6f0af051b46fc8ba55e6c7b450;hp=6d9b8761b439ed689ce5eb5cac3050cf80286cc5;hb=50c1239917f5e443b8ec91773c85ceb3db7da67b;hpb=1dd005530930657fd6216edc1dfcfa4c270a81c9 diff --git a/src/Moof/cml/core/meta/common.h b/src/Moof/cml/core/meta/common.h index 6d9b876..08c129d 100644 --- a/src/Moof/cml/core/meta/common.h +++ b/src/Moof/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