|
Boost : |
Subject: Re: [boost] [type_traits][core] modularisation and moving stuff about (again)
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-08-23 11:23:53
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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk