Add RemoveConstReference metaprogamming struct
authorMikko Rasa <tdb@tdb.fi>
Fri, 27 Sep 2019 00:05:07 +0000 (03:05 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 27 Sep 2019 00:05:07 +0000 (03:05 +0300)
It combines RemoveConst and RemoveReference but is much shorter

source/core/meta.h

index d6ca35935543049d8026b842ecca40785a92ecae..8015f42370837e2ba6633acb0ee9b50a87ca9273 100644 (file)
@@ -23,6 +23,11 @@ struct RemoveReference<T &>
 { typedef T Type; };
 
 
+template<typename T>
+struct RemoveConstReference
+{ typedef typename RemoveConst<typename RemoveReference<T>::Type>::Type Type; };
+
+
 template<bool c, typename R>
 struct EnableIf;