Boost logo

Boost :

Subject: Re: [boost] [type_traits] Is it possible to test for an explicit conversion?
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2012-07-20 10:22:32


John Maddock-3 wrote
>
> OK, so we don't have such a trait at present, but one of the requests from
> the multiprecision review was "make conversions explicit in the front end
> if
> they are in the backend". Which to do it nicely (and semi-automagically)
> requires a trait that tests whether A is explicitly convertible to B.
> Which
> would obviously make a useful type trait in it's own right, but....
> anyone
> have any ideas on how such a trait could be implemented? At present it
> looks "impossible" to me, but I've learned never to say never ;-)
>
> Thanks, John.
>
>

Hi,

I don't know on which state there are the traits I introduced in the
rejected Boost.Conversion:

is_assignable.hpp
is_constructible.hpp
is_convertible.hpp
is_copy_assignable.hpp
is_copy_constructible.hpp
is_default_constructible.hpp
is_destructible.hpp
is_explicitly_convertible.hpp
is_move_assignable.hpp
is_move_constructible.hpp

Of course, there should be some limitation with older compilers.

(See
https://svn.boost.org/svn/boost/sandbox/conversion/libs/conversion_ext/doc/html/boost/conversion/reference.html#boost.conversion.reference.type_traits_extensions
and

https://svn.boost.org/svn/boost/sandbox/conversion/boost/conversion/type_traits/
).

HTH,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/type-traits-Is-it-possible-to-test-for-an-explicit-conversion-tp4633335p4633348.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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