Opened 11 years ago
Closed 10 years ago
#6645 closed Bugs (fixed)
lexical_cast<float>("0.0") -> warning:
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.50.0 | Component: | lexical_cast |
Version: | Boost 1.49.0 | Severity: | Optimization |
Keywords: | lexical_cast float warning | Cc: | antoshkka@… |
Description
float f = boost::lexical_cast<float>("0.123");
compiler warning: boost/boost/lexical_cast.hpp:954: warning: implicit conversion shortens 64-bit value into a 32-bit value
32 and 64 bit with i686-apple-darwin10-gcc-4.2.1 (Xcode 3.2.5)
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Cc: | added |
---|---|
Status: | new → assigned |
Changes were made in trunk at r77221 to suppress this warning.
can you reproduce it now?
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
boost/lexical_cast.hpp: In function 'bool boost::detail::lcast_ret_float(T&, const CharT*, const CharT*) [with Traits = std::char_traits<char>, T = float, CharT = char]':
boost/lexical_cast.hpp:1637: instantiated from 'bool boost::detail::lexical_stream_limited_src<CharT, Traits, RequiresStringbuffer>::operator>>(float&) [with CharT = char, Traits = std::char_traits<char>, bool RequiresStringbuffer = true]'
boost/lexical_cast.hpp:1920: instantiated from 'static Target boost::detail::lexical_cast_do_cast<Target, Source>::lexical_cast_impl(const Source&) [with Target = float, Source = const char*]'
boost/lexical_cast.hpp:2087: instantiated from 'Target boost::lexical_cast(const Source&) [with Target = float, Source = char [6]]'
sandbox.cpp:149: instantiated from here
boost/lexical_cast.hpp:954: warning: implicit conversion shortens 64-bit value into a 32-bit value