[Boost-bugs] [Boost C++ Libraries] #4327: warning C4244: conversion from '__int64' to 'long', possible loss of data

Subject: [Boost-bugs] [Boost C++ Libraries] #4327: warning C4244: conversion from '__int64' to 'long', possible loss of data
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-09 18:02:37


#4327: warning C4244: conversion from '__int64' to 'long', possible loss of data
-------------------------------------+--------------------------------------
 Reporter: viboes | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: Boost 1.44.0 | Component: thread
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 The following warning appears on msvc-9.0express:

 {{{
 compile-c-c++
 ..\..\..\bin.v2\libs\thread\test\test_condition_notify_one.test\msvc-9.0express\debug
 \threading-multi\test_condition_notify_one.obj
 test_condition_notify_one.cpp
 C:\cygwin\boost\trunk\boost/thread/win32/thread_data.hpp(171) : warning
 C4244: 'argument' : conversion from '__int64' to 'long', possible loss of
 data
         test_condition_notify_one.cpp(116) : see reference to function
 template instantiation 'void
 boost::this_thread::sleep<boost::date_time::subsecond_duration<base_duration,frac_of_second>>(const
 TimeDuration &)' being compiled
         with
         [
             base_duration=boost::posix_time::time_duration,
             frac_of_second=0x03e8,
 TimeDuration=boost::date_time::subsecond_duration<boost::posix_time::time_duration,0x03e8>
         ]
 }}}


 The context is the call to pin_to_zero when the duration is stored on
 something larger than a long.


 {{{
         template<typename TimeDuration>
         inline void sleep(TimeDuration const& rel_time)
         {
 interruptible_wait(detail::pin_to_zero(rel_time.total_milliseconds()));
         }
 }}}

 I guest that we need another pin_to_zero overloading or making the
 pin_to_zero generic.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4327>
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:03 UTC