
On 12/2/2020 6:07 AM, Peter Dimov via Boost wrote:
Alexander Grund wrote:
IMO it would be enough on a cost-benefit ratio to go to C++11 by basically banning the use of MPL in Boost (the single-worst offender on compile times) and reducing the use of type_traits to the absolute minimum. Those 2 are (transitively) in the largest chunk of boost libraries and hence hit hard on compiletimes.
What is the problem with TypeTraits?
More than that, many of the standard's type traits are inferior due to their cop-out requirements. I suspect that if compilers actually verified those requirements, almost every significant program that used them would be ill-formed. E.g. boost::is_constructible<T, Args...> vs. std::is_constructible<T, Args...>. Both effectively test: T t(std::declval<Args>()...); which passes rvalue or lvalue reference types. Boost's requires T to be a complete type. The standard's requires T *and* all types in Args to be complete types. The standard's type traits are rife with these kinds of overzealous requirements.