|
Boost Users : |
Subject: Re: [Boost-users] Conversion warning from boost/functional/hash/detail/hash_float_generic.hpp
From: Greg Ward (greg_at_[hidden])
Date: 2010-11-26 15:18:16
On Fri, Nov 19, 2010 I wrote:
> I'm getting a strange warning from
> <boost/functional/hash/detail/hash_float_generic.hpp>. Â What's strange
> is not the warning, but the circumstances: if I use the boost headers
> installed in /usr/include, no warning. Â But if I make a copy of
> /usr/include/boost and tell the compiler to use the copy, I get a
> warning.
[...]
>
> In file included from include/boost/functional/hash/detail/hash_float.hpp:30,
> Â Â Â Â Â Â Â Â from include/boost/functional/hash/hash.hpp:15,
> Â Â Â Â Â Â Â Â from include/boost/functional/hash.hpp:6,
> Â Â Â Â Â Â Â Â from test.cpp:1:
> include/boost/functional/hash/detail/hash_float_generic.hpp: In
> function âsize_t boost::hash_detail::float_hash_impl2(T) [with T =
> float]â:
> include/boost/functional/hash/detail/hash_float_generic.hpp:82:
> instantiated from âsize_t boost::hash_detail::float_hash_impl(T) [with
> T = float]â
> include/boost/functional/hash/detail/hash_float.hpp:74: Â instantiated
> from âsize_t boost::hash_detail::float_hash_value(T) [with T = float]â
> include/boost/functional/hash/hash.hpp:315: Â instantiated from here
> include/boost/functional/hash/detail/hash_float_generic.hpp:56:
> warning: conversion to âfloatâ from âsize_tâ may alter its value
> include/boost/functional/hash/detail/hash_float_generic.hpp:82:
> instantiated from âsize_t boost::hash_detail::float_hash_impl(T) [with
> T = float]â
> include/boost/functional/hash/detail/hash_float.hpp:74: Â instantiated
> from âsize_t boost::hash_detail::float_hash_value(T) [with T = float]â
> include/boost/functional/hash/hash.hpp:315: Â instantiated from here
> include/boost/functional/hash/detail/hash_float_generic.hpp:69:
> warning: conversion to âfloatâ from âsize_tâ may alter its value
I'm still having no luck here. No idea how to make the warning go
away, except by using the version of boost installed in /usr/local
(e.g.) rather than a symlink to it.
I tried upgrading to GCC 4.4.5 with the same build of boost (1.44.0
built by GCC 4.4.4): no luck. Same result.
I *would* upgrade to boost 1.45.0, but I'm having trouble building it
(working on that in another thread).
Any ideas?
Greg
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net