|
Boost : |
From: John Maddock (john_maddock_at_[hidden])
Date: 2002-04-03 06:58:53
> is_convertible_test.cpp has:
>
> value_test(false, (boost::is_convertible<boost::noncopyable,
> int>::value));
>
> where is_convertible is (partially) defined as:
>
> static no_type BOOST_TT_DECL _m_check(...);
> static yes_type BOOST_TT_DECL _m_check(To);
>
> I'm not sure this is legal code. The _m_check(To) overload requires an
> accessible copy constructor. I guess the question is, is access of this
> copy constructor checked before or after overload resolution?
is_convertible<noncopyable, noncopyable> doesn't compile as you rightly
point out (I wish it did though!), however the test is a conversion to int,
which I thought was OK to test - the object gets passed through (...),
however on reflection I think this may be illegal as well? Whatever I've
taken the safe option and removed that test.
John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk