Explorar o código

Fix Value<T> specializations for qualified types

Ole %!s(int64=10) %!d(string=hai) anos
pai
achega
2f0eddeb25
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  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