Subject: [Boost-bugs] [Boost C++ Libraries] #6936: Warning 4244 in posix_time_zone.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-23 17:53:07
#6936: Warning 4244 in posix_time_zone.hpp
-----------------------------------------------------+----------------------
Reporter: michael.cowperthwaite@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.49.0
Severity: Problem | Keywords:
-----------------------------------------------------+----------------------
The warnings:
{{{
C:\Dev\Include\boost/date_time/local_time/posix_time_zone.hpp(433) :
warning C4244: 'argument' : conversion from 'int' to 'unsigned short',
possible loss of data
1>
C:\Dev\Include\boost/date_time/local_time/posix_time_zone.hpp(414) : while
compiling class template member function 'void
boost::local_time::posix_time_zone_base<CharT>::julian_no_leap(const
std::basic_string<_Elem,_Traits,_Ax> &,const
std::basic_string<_Elem,_Traits,_Ax> &)'
1> with
1> [
1> CharT=char,
1> _Elem=char,
1> _Traits=std::char_traits<char>,
1> _Ax=std::allocator<char>
1> ]
1> .\MYFILE.cpp(NN) : see reference to class template instantiation
'boost::local_time::posix_time_zone_base<CharT>' being compiled
1> with
1> [
1> CharT=char
1> ]
1>C:\Dev\Include\boost/date_time/local_time/posix_time_zone.hpp(435) :
warning C4244: 'argument' : conversion from 'int' to 'unsigned short',
possible loss of data
}}}
The line in my code that spawns this:
{{{
time_zone_ptr timezone;
string tz("UTC0"); // may be changed
//...
timezone.reset(new posix_time_zone(tz.c_str())); // warnings from here
}}}
The warnings occur within body of `julian_no_leap()` at the instantiation
of `new partial_date_dst_rule`, specifically, one each for the start_rule
and end_rule constructors.
MSVC 2008, compiling on and for Windows 7.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6936> 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:09 UTC