On Wed, Sep 17, 2014 at 1:45 PM, Peter Dimov
Andrey Semashev wrote:
How about we just remove the common_type include from type_traits.hpp?
That would be a breaking change, wouldn't it?
It will break code that includes boost/type_traits.hpp and uses boost::common_type, yes. Since common_type is a relatively late addition, such code is, I submit, rare.
It will also break the dependency of boost/type_traits.hpp on typeof. There are many libraries that include type_traits.hpp and do not use common_type, and this will automatically make them not depend on typeof.
I think such libraries should be fixed instead (by replacing type_traits.hpp inclusion with more specific headers). What is the reason of having type_traits.hpp in the first place? If it's an "include all" header to simplify user's life then "all" means all, including common_type, IMHO.