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

Subject: Re: [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-08-26 13:32:36


#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
Resolution: | Keywords:
--------------------------------------+-------------------------------------

Comment (by James_E_K@…):

 I got rid of the warning by adding this after the existing pin_to_zero:

         inline int64_t pin_to_zero(int64_t value)
         {
             return (value<0)?0ull:(int64_t)value;
         }

 And adding this new interruptable_wait function:

         inline void interruptible_wait(int64_t milliseconds)
         {
 interruptible_wait(detail::win32::invalid_handle_value,milliseconds);
         }

 Whether or not this properly works with a value greater than ULONG_MAX is
 unknown.

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