Chris@102: /* Chris@102: (c) 2014 Glen Joseph Fernandes Chris@102: glenjofe at gmail dot com Chris@102: Chris@102: Distributed under the Boost Software Chris@102: License, Version 1.0. Chris@102: http://boost.org/LICENSE_1_0.txt Chris@102: */ Chris@102: #ifndef BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP Chris@102: #define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP Chris@102: Chris@102: #include Chris@102: Chris@102: #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) Chris@102: #include Chris@102: #endif Chris@102: Chris@102: namespace boost { Chris@102: namespace alignment { Chris@102: namespace detail { Chris@102: #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) Chris@102: using std::integral_constant; Chris@102: #else Chris@102: template Chris@102: struct integral_constant { Chris@102: typedef T value_type; Chris@102: typedef integral_constant type; Chris@102: Chris@102: #if !defined(BOOST_NO_CXX11_CONSTEXPR) Chris@102: constexpr operator value_type() const { Chris@102: return Value; Chris@102: } Chris@102: Chris@102: static constexpr T value = Value; Chris@102: #else Chris@102: enum { Chris@102: value = Value Chris@102: }; Chris@102: #endif Chris@102: }; Chris@102: #endif Chris@102: } Chris@102: } Chris@102: } Chris@102: Chris@102: #endif