23 Aug
2018
23 Aug
'18
11:23 a.m.
On 08/23/18 14:12, Peter Dimov via Boost wrote:
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.
Does is_base_and_derived (non-intrinsic-based) work with private inheritance?