|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68382 - trunk/boost/chrono
From: vicente.botet_at_[hidden]
Date: 2011-01-23 09:57:37
Author: viboes
Date: 2011-01-23 09:57:37 EST (Sun, 23 Jan 2011)
New Revision: 68382
URL: http://svn.boost.org/trac/boost/changeset/68382
Log:
Boost.Chrono: Try to solve some msvc9.0 issues related to enable_if on duration overloading
Text files modified:
trunk/boost/chrono/duration.hpp | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Modified: trunk/boost/chrono/duration.hpp
==============================================================================
--- trunk/boost/chrono/duration.hpp (original)
+++ trunk/boost/chrono/duration.hpp 2011-01-23 09:57:37 EST (Sun, 23 Jan 2011)
@@ -695,7 +695,15 @@
bool operator()(const LhsDuration& lhs, const RhsDuration& rhs)
{
typedef typename common_type<LhsDuration, RhsDuration>::type CD;
+#if defined(BOOST_MSVC) && (BOOST_MSVC == 1500)
+ // trying to simplify expression so enable_if is not used (Pb. with MSVC.9.0)
+ return
+ chrono::detail::duration_cast<LhsDuration, CD>()(lhs).count()
+ <
+ chrono::detail::duration_cast<RhsDuration, CD>()(rhs).count();
+#else
return CD(lhs).count() < CD(rhs).count();
+#endif
}
};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk