Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-04-08 05:52:53


> I am getting a strange warning message when using is_convertible<> to
> test floats and doubles with GCC 3.2 (RH 8.0 release) and boost 1.30.
>
> When I write this code:
>
> bool test = boost::is_convertible<float,int>::value;
>
> I get the following warning:
>
> test.cpp:129: instantiated from `boost::is_convertible<float, int>'
> test.cpp:129: instantiated from here
> /boost/boost/type_traits/is_convertible.hpp:128: warning: passing
> `float' for argument 1 of `static yes_type
> boost::detail::checker<T>::_m_check(T, int) [with T = int]'
>
> I could just ignore the warning, but I am seeing this with
> boost::variant (the variant contains float and double) and there are a
> LARGE number of warnings output. :(
>
> Can anyone suggest a work around, am I using it wrong, or is this a
> known issue with type_traits?

It should now be fixed in cvs, thanks for reminding me about that one....

John.


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