|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65295 - in sandbox/chrono/boost/chrono: . detail
From: vicente.botet_at_[hidden]
Date: 2010-09-05 11:21:15
Author: viboes
Date: 2010-09-05 11:21:07 EDT (Sun, 05 Sep 2010)
New Revision: 65295
URL: http://svn.boost.org/trac/boost/changeset/65295
Log:
* make static assertion use -1 index instead of 0 as gcc-4.5 allows the definition of arrays with size 0.
* refine dependencies
Text files modified:
sandbox/chrono/boost/chrono/detail/static_assert.hpp | 2 +-
sandbox/chrono/boost/chrono/duration.hpp | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
Modified: sandbox/chrono/boost/chrono/detail/static_assert.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/detail/static_assert.hpp (original)
+++ sandbox/chrono/boost/chrono/detail/static_assert.hpp 2010-09-05 11:21:07 EDT (Sun, 05 Sep 2010)
@@ -23,7 +23,7 @@
BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
#else
//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
-#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[CND]
+#define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
//~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
#endif
Modified: sandbox/chrono/boost/chrono/duration.hpp
==============================================================================
--- sandbox/chrono/boost/chrono/duration.hpp (original)
+++ sandbox/chrono/boost/chrono/duration.hpp 2010-09-05 11:21:07 EDT (Sun, 05 Sep 2010)
@@ -42,8 +42,11 @@
#include <boost/mpl/logical.hpp>
#include <boost/ratio.hpp>
#include <boost/type_traits/common_type.hpp>
-#include <boost/cstdint.hpp>
#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+
+#include <boost/cstdint.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/integer_traits.hpp>
@@ -357,7 +360,7 @@
// //
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
-// 20.9.2.1 is_floating_point [time.traits.is_fp] //
+// 20.9.2.1 treat_as_floating_point [time.traits.is_fp] //
// Probably should have been treat_as_floating_point. Editor notifed. //
//----------------------------------------------------------------------------//
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