[Boost-bugs] [Boost C++ Libraries] #13373: Warning in Boost.Log or Boost.DateTime with VS2017

Subject: [Boost-bugs] [Boost C++ Libraries] #13373: Warning in Boost.Log or Boost.DateTime with VS2017
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-03 10:35:25


#13373: Warning in Boost.Log or Boost.DateTime with VS2017
--------------------------------+---------------------
 Reporter: christof.krueger@… | Owner: (none)
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.65.0 | Severity: Problem
 Keywords: |
--------------------------------+---------------------
 I'm getting the following compiler warning while compiling my code with
 VS2017 on a Windows 7 machine:

 {{{
 C:\Users\<...>\boost-1_65_1\boost/log/support/date_time.hpp(66): warning
 C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data
 ...
 C:\Users\<...>\boost-1_65_1\boost/log/support/date_time.hpp(67): warning
 C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data
 C:\Users\<...>\boost-1_65_1\boost/log/support/date_time.hpp(68): warning
 C4244: '=': conversion from '__int64' to 'uint32_t', possible loss of data

 }}}

 I'm using a simple console log (boost::log::add_console_log(std::clog))
 wich a formatter created like this:

 {{{
 namespace expr = boost::log::expressions;
 auto fmtTimeStamp =
 expr::format_date_time<boost::posix_time::ptime>("TimeStamp", %Y-%m-%d
 %H:%M:%S.%f");
 boost::log::formatter logFmt
     = expr::format("[%1%] [%2%] {%3%} <%4%> %5%")
         % fmtTimeStamp
         % expr::attr<my_severity_level_type>("Severity")
         %
 expr::attr<std::string>("ThreadName").or_default(std::string("?"))
         % expr::attr<std::string>("Channel").or_default(std::string("?"))
         % expr::message;
 }}}

 Is there anything I could do about? Or is it something that should be
 fixed within Boost? I'd like to have warning-free code wherever possible,
 of course.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13373>
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 : 2018-01-03 10:40:21 UTC