John Maddock wrote:
Incidentally, why is our decay<> not the same as std::decay? Should it be changed to conform?
Yes, I fixed that yesterday, see
https://svn.boost.org/trac/boost/ticket/7760 and https://github.com/boostorg/type_traits/commit/d3ac8b95c4cbc8876746b573daf3f....
Does that render remove_cv_ref more or less redundant?
remove_cv_ref is not quite the same thing as decay. If you want a hypothetical common_type that respects references, you'd still need remove_cv_ref (to compute int const volatile (&) [] from int const (&) [] and int volatile (&) [] for instance.) That said, remove_cv_ref is no longer used by the common_type implementation.
Also noticed in your code, how easy is it to extend to other built in arithmetic types?
Very. I'll add char16_t, char32_t and __int128 support. And __float128 if you add a Config macro for it. :-)
And while you're on a roll.... can you see how to fix https://svn.boost.org/trac/boost/ticket/7544? common_type should have member ::type only when such a common type exists.
On C++11 or on C++03?
On C++11, it's as easy as
template