Subject: [Boost-bugs] [Boost C++ Libraries] #6297: Warning under VC
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-19 15:57:10
#6297: Warning under VC
------------------------------+---------------------------------------------
Reporter: apolukhin | Owner: dgregor
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: numeric
Version: Boost 1.48.0 | Severity: Cosmetic
Keywords: |
------------------------------+---------------------------------------------
Warning text:[[BR]]
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(166) : warning
C4800: 'int' : forcing value to bool 'true' or 'false' (performance
warning)
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(165) :
while compiling class template member function
'boost::numeric::range_check_result
boost::numeric::convdetail::GT_HiT<Traits>::apply(bool)'
with
[
Traits=conv_traits
]
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(236) :
see reference to class template instantiation
'boost::numeric::convdetail::GT_HiT<Traits>' being compiled
with
[
Traits=conv_traits
]
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(288) :
see reference to class template instantiation
'boost::numeric::convdetail::combine<PredA,PredB>' being compiled
with
[
PredA=boost::numeric::convdetail::non_applicable,
PredB=boost::numeric::convdetail::GT_HiT<conv_traits>
]
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(287) :
while compiling class template member function
'boost::numeric::range_check_result
boost::numeric::convdetail::generic_range_checker<Traits,IsNegOverflow,IsPosOverflow,OverflowHandler>::out_of_range(bool)'
with
[
Traits=conv_traits,
IsNegOverflow=boost::numeric::convdetail::non_applicable,
IsPosOverflow=boost::numeric::convdetail::GT_HiT<conv_traits>,
OverflowHandler=boost::numeric::numeric_cast_traits<int,bool>::overflow_policy
]
c:\test\boost\boost\numeric\conversion\detail\converter.hpp(508) :
see reference to class template instantiation
'boost::numeric::convdetail::generic_range_checker<Traits,IsNegOverflow,IsPosOverflow,OverflowHandler>'
being compiled
with
[
Traits=conv_traits,
IsNegOverflow=boost::numeric::convdetail::non_applicable,
IsPosOverflow=boost::numeric::convdetail::GT_HiT<conv_traits>,
OverflowHandler=boost::numeric::numeric_cast_traits<int,bool>::overflow_policy
]
c:\test\boost\boost\numeric\conversion\converter.hpp(35) : see
reference to class template instantiation
'boost::numeric::convdetail::non_rounding_converter<Traits,RangeChecker,RawConverter>'
being compiled
with
[
Traits=conv_traits,
RangeChecker=boost::numeric::convdetail::generic_range_checker<conv_traits,boost::numeric::convdetail::non_applicable,boost::numeric::convdetail::GT_HiT<conv_traits>,boost::numeric::numeric_cast_traits<int,bool>::overflow_policy>,
RawConverter=boost::numeric::raw_converter<conv_traits>
]
c:\test\boost\boost\numeric\conversion\cast.hpp(53) : see
reference to class template instantiation
'boost::numeric::converter<T,S,Traits,OverflowHandler,Float2IntRounder,RawConverter,UserRangeChecker>'
being compiled
with
[
T=int,
S=bool,
Traits=conv_traits,
OverflowHandler=boost::numeric::numeric_cast_traits<int,bool>::overflow_policy,
Float2IntRounder=boost::numeric::Trunc<bool>,
RawConverter=boost::numeric::raw_converter<conv_traits>,
UserRangeChecker=boost::numeric::numeric_cast_traits<int,bool>::range_checking_policy
]
The code that may lead to warning is like this:
{{{
int val = boost::numeric_cast<int>(true);
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6297> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC