On 28/05/2015 16:59, Peter Dimov wrote:
It looks to me that following the ?: specification would actually be easier to follow and more correct.
I sketched an implementation along those lines, which as a side effect defines the following useful traits:
identity<T> (::type == T) remove_cv_ref<T> (remove_cv
)
I would be inclined to call that remove_cv_reference ?
combine_cv
(copies the cv qualifiers from U to T)
See https://svn.boost.org/trac/boost/ticket/3970
common_arithmetic_type
(for arithmetic or enum types, their common type per "usual arithmetic conversions") composite_pointer_type ( the "composite pointer type" per the standard, that is, the pointer type to which both T and U will convert) Should we add those traits to the library proper, or is it better for them to remain implementation details? The first three seem to be rediscovered on a daily basis.
IMO +1 on the first three, much less sure about the last 2. Care to submit a PR? Thanks, John.