|
Boost : |
From: John Maddock (john_at_[hidden])
Date: 2006-04-14 06:19:11
> In a post from yesterday (see http://tinyurl.com/hzk5w),
> Alexei Alexandrov found a rather serious problem with
> is_convertible in at least MSVC 7.1 and Intel 9.0, namely
> that is_convertible<From,To> fails to compile when
>> From is non-copyable, emitting an error message like this:
Wait a second, I've just looked at the original error messages, and the test
case is very specific, it fails for:
is_convertible<const noncopyable, const noncopyable>
That is known not to work, *and will never work*, there is no way we can
define a trait that detects whether a type is copy-constructable or not. In
other words the From and To parameters must be different types.
Likewise is_convertible<From, To> will fail if To has a private constructor
taking a From as argument.
Sorry but it's an inherent limitation of the trait implemented without
core-language support.
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk