id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2819,"boost::posix_time::hours, minutes, and seconds assume sizeof(long) == sizeof(int)",pelee@…,"James E. King, III","The constructors for boost::posix_time::hours, minutes, and seconds take arguments of type long, which is 64 bits on 64 bit LP64 environments like MacOS 10.5. This leads to warnings about possible truncation when these arguments are passed to the constructor for time_duration. Since time_duration is a template class that can be instantiated for different types, boost::sint32_t seems like a safer type to use in the non-templated constructors in boost::posix_time than a compiler-specific type like long. {{{ //! Allows expression of durations as an hour count /*! \ingroup time_basics */ class hours : public time_duration { public: explicit hours(boost::int32_t h) : time_duration(h,0,0) {} }; //! Allows expression of durations as a minute count /*! \ingroup time_basics */ class minutes : public time_duration { public: explicit minutes(boost::int32_t m) : time_duration(0,m,0) {} }; //! Allows expression of durations as a seconds count /*! \ingroup time_basics */ class seconds : public time_duration { public: explicit seconds(boost::int32_t s) : time_duration(0,0,s) {} }; }}} ",Bugs,closed,Boost 1.67.0,date_time,Boost 1.37.0,Problem,fixed,,