summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/ratio/example/static_assert.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/ratio/example/static_assert.hpp')
-rw-r--r--src/boost/libs/ratio/example/static_assert.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/boost/libs/ratio/example/static_assert.hpp b/src/boost/libs/ratio/example/static_assert.hpp
new file mode 100644
index 000000000..b2d912eee
--- /dev/null
+++ b/src/boost/libs/ratio/example/static_assert.hpp
@@ -0,0 +1,30 @@
+// static_assert.hpp --------------------------------------------------------------//
+
+// Copyright 2009-2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_EX_CHRONO_DETAIL_STATIC_ASSERT_HPP
+#define BOOST_EX_CHRONO_DETAIL_STATIC_ASSERT_HPP
+
+#include "config.hpp"
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_EX_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_CHRONO_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_EX_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_CHRONO_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_EX_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \
+ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+//~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT)
+#define BOOST_EX_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1]
+//~ #define BOOST_EX_CHRONO_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#endif // BOOST_EX_CHRONO_DETAIL_STATIC_ASSERT_HPP