8 Jun
2014
8 Jun
'14
12:53 p.m.
Hi, Recently I found some use for a tool adding const to a type if some other type is const. My use case was something like this: typename const_conformant < Range, typename boost::range_value<Range>::type
::type ...
I'm guessing that such use cases are quite common, not only for const but also other qualifiers. Do you think that a family of traits adding or removing qualifiers based on the qualifiers of some other type could be a useful addon to the TypeTraits? E.g.: same_const<BaseT, T> same_cv<BaseT, T> same_pointer<BaseT, T> same_reference<BaseT, T> same_rvalue_reference<BaseT, T> same_volatile<BaseT, T> same_extents<BaseT, T> //etc. Regards, Adam