Boost logo

Boost :

Subject: [boost] [type_traits] Proposal: same_xxx
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-06-08 08:53:41


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
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

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>


Boost list run by bdawes at, gregod at, cpdaniel at, john at