23 Aug
2018
23 Aug
'18
11:12 a.m.
Andrey Semashev wrote:
For noncopyable, we could convert its detection from is_base_and_derived to a dispatch based on SFINAE.
// Boost.Core class noncopyable { public: typedef void _is_boost_noncopyable; };
// Boost.TypeTraits template< typename T, typename = void > struct is_boost_noncopyable : false_type {};
template< typename T > struct is_boost_noncopyable< T, typename T::_is_boost_noncopyable > : true_type {};
This doesn't work because types derive privately from boost::noncopyable, and the trait above returns false in this case.