Parcourir la Source

Fix Value<T> specializations for qualified types

Ole il y a 10 ans
Parent
commit
2f0eddeb25
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      lib/luwra/types.hpp

+ 12 - 0
lib/luwra/types.hpp

@@ -298,6 +298,18 @@ struct Value<std::tuple<A...>> {
 	}
 };
 
+/**
+ * Fix specialization for const types.
+ */
+template <typename T>
+struct Value<const T>: Value<T> {};
+
+/**
+ * Fix specialization for volatile types.
+ */
+template <typename T>
+struct Value<volatile T>: Value<T> {};
+
 LUWRA_NS_END
 
 #endif