summaryrefslogtreecommitdiff
path: root/boost/align/alignment_of.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/align/alignment_of.hpp')
-rw-r--r--boost/align/alignment_of.hpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/boost/align/alignment_of.hpp b/boost/align/alignment_of.hpp
index 2531ced105..fee91838af 100644
--- a/boost/align/alignment_of.hpp
+++ b/boost/align/alignment_of.hpp
@@ -9,9 +9,8 @@ http://boost.org/LICENSE_1_0.txt
#ifndef BOOST_ALIGN_ALIGNMENT_OF_HPP
#define BOOST_ALIGN_ALIGNMENT_OF_HPP
-#include <boost/config.hpp>
+#include <boost/align/detail/element_type.hpp>
#include <boost/align/alignment_of_forward.hpp>
-#include <boost/align/detail/remove_traits.hpp>
#if defined(BOOST_MSVC)
#include <boost/align/detail/alignment_of_msvc.hpp>
@@ -41,12 +40,14 @@ namespace alignment {
template<class T>
struct alignment_of
: detail::alignment_of<typename
- detail::remove_cv<typename
- detail::remove_all_extents<typename
- detail::remove_reference<T>::
- type>::type>::type>::type {
+ detail::element_type<T>::type>::type {
};
+#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
+template<class T>
+constexpr std::size_t alignment_of_v = alignment_of<T>::value;
+#endif
+
} /* .alignment */
} /* .boost */