Boost logo

Boost :

Subject: Re: [boost] [type_traits][core] modularisation and moving stuff about (again)
From: Peter Dimov (lists_at_[hidden])
Date: 2018-08-23 11:12:42


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk