]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/units/static_constant.hpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / boost / units / static_constant.hpp
index 9026b3fde2175c93f4640c473cff531404680750..d3646adbda9c3266036ce2a3e84e2f8ad0e01633 100644 (file)
 
 #include <boost/units/config.hpp>
 
+#if defined(BOOST_NO_CXX11_CONSTEXPR) || defined(BOOST_UNITS_DOXYGEN)
 /// A convenience macro that allows definition of static
 /// constants in headers in an ODR-safe way.
-#define BOOST_UNITS_STATIC_CONSTANT(name, type)             \
+# define BOOST_UNITS_STATIC_CONSTANT(name, type)            \
 template<bool b>                                            \
 struct name##_instance_t                                    \
 {                                                           \
@@ -29,6 +30,10 @@ namespace                                                   \
                                                             \
 template<bool b>                                            \
 const type name##_instance_t<b>::instance
+#else
+# define BOOST_UNITS_STATIC_CONSTANT(name, type)            \
+BOOST_STATIC_CONSTEXPR type name
+#endif
 
 /// A convenience macro for static constants with auto 
 /// type deduction.