Boost.Chrono: Move operator% to the lib extension's
[SVN r68031]
This commit is contained in:
parent
5ae17865aa
commit
0d7ae19978
@ -64,7 +64,8 @@
|
||||
#undef BOOST_CHRONO_HAS_THREAD_CLOCK
|
||||
#undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY
|
||||
#endif
|
||||
// unicode support
|
||||
|
||||
// unicode support ------------------------------//
|
||||
|
||||
#if defined(BOOST_NO_UNICODE_LITERALS) || defined(BOOST_NO_CHAR16_T) || defined(BOOST_NO_CHAR32_T)
|
||||
//~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT
|
||||
@ -98,10 +99,6 @@
|
||||
|
||||
// enable dynamic linking on Windows ---------------------------------------//
|
||||
|
||||
//# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__)
|
||||
//# error Dynamic linking Boost.System does not work for Borland; use static linking instead
|
||||
//# endif
|
||||
|
||||
#ifdef BOOST_HAS_DECLSPEC // defined by boost.config
|
||||
// we need to import/export our code only if the user has specifically
|
||||
// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
|
||||
|
@ -601,6 +601,7 @@ namespace chrono {
|
||||
return CD(lhs).count() / CD(rhs).count();
|
||||
}
|
||||
|
||||
#ifdef BOOST_CHRONO_EXTENSIONS
|
||||
template <class Rep1, class Rep2, class Period>
|
||||
inline
|
||||
typename boost::disable_if <boost::chrono::detail::is_duration<Rep1>,
|
||||
@ -611,10 +612,9 @@ namespace chrono {
|
||||
{
|
||||
typedef typename common_type<Rep1, Rep2>::type CR;
|
||||
duration<CR, Period> r = d;
|
||||
//return static_cast<CR>(r.count()) / static_cast<CR>(s);
|
||||
return static_cast<CR>(s)/r.count();
|
||||
}
|
||||
|
||||
#endif
|
||||
// Duration %
|
||||
|
||||
template <class Rep1, class Period, class Rep2>
|
||||
|
Loading…
Reference in New Issue
Block a user