]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/cml/core/meta/common.h
cml version bump to 1.0.1
[chaz/yoink] / src / Moof / cml / core / meta / common.h
index 6d9b8761b439ed689ce5eb5cac3050cf80286cc5..08c129d295985b6f0af051b46fc8ba55e6c7b450 100644 (file)
@@ -80,6 +80,36 @@ template<> struct same_type<any_type,any_type> {
     enum { is_true = true, is_false = false };
 };
 
+/** Remove a reference qualifier from a type. */
+template<typename T> struct remove_reference {
+    template<typename Q, typename Dummy> struct helper {
+        typedef Q type;
+    };
+
+    template<typename Q> struct helper<Q&, void> {
+        typedef Q type;
+    };
+
+    template<typename Q> struct helper<const Q&, void> {
+        typedef const Q type;
+    };
+
+    typedef typename helper<T,void>::type type;
+};
+
+/** Remove a const qualifier from a type. */
+template<typename T> struct remove_const {
+    template<typename Q, typename Dummy> struct helper {
+        typedef Q type;
+    };
+
+    template<typename Q> struct helper<const Q, void> {
+        typedef Q type;
+    };
+
+    typedef typename helper<T,void>::type type;
+};
+
 } // namespace cml
 
 #endif
This page took 0.017469 seconds and 4 git commands to generate.