summaryrefslogtreecommitdiff
path: root/boost/align/detail
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:33:54 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:36:09 +0900
commitd9ec475d945d3035377a0d89ed42e382d8988891 (patch)
tree34aff2cee4b209906243ab5499d61f3edee2982f /boost/align/detail
parent71d216b90256936a9638f325af9bc69d720e75de (diff)
downloadboost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.gz
boost-d9ec475d945d3035377a0d89ed42e382d8988891.tar.bz2
boost-d9ec475d945d3035377a0d89ed42e382d8988891.zip
Imported Upstream version 1.60.0
Change-Id: Ie709530d6d5841088ceaba025cbe175a4ef43050 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/align/detail')
-rw-r--r--boost/align/detail/address.hpp12
-rw-r--r--boost/align/detail/addressof.hpp8
-rw-r--r--boost/align/detail/align.hpp8
-rw-r--r--boost/align/detail/align_cxx11.hpp6
-rw-r--r--boost/align/detail/aligned_alloc.hpp6
-rw-r--r--boost/align/detail/aligned_alloc_android.hpp6
-rw-r--r--boost/align/detail/aligned_alloc_macos.hpp8
-rw-r--r--boost/align/detail/aligned_alloc_msvc.hpp6
-rw-r--r--boost/align/detail/aligned_alloc_posix.hpp6
-rw-r--r--boost/align/detail/aligned_alloc_sunos.hpp6
-rw-r--r--boost/align/detail/alignment_of.hpp19
-rw-r--r--boost/align/detail/alignment_of_clang.hpp8
-rw-r--r--boost/align/detail/alignment_of_codegear.hpp8
-rw-r--r--boost/align/detail/alignment_of_cxx11.hpp8
-rw-r--r--boost/align/detail/alignment_of_gcc.hpp8
-rw-r--r--boost/align/detail/alignment_of_msvc.hpp21
-rw-r--r--boost/align/detail/assume_aligned.hpp2
-rw-r--r--boost/align/detail/assume_aligned_clang.hpp8
-rw-r--r--boost/align/detail/assume_aligned_gcc.hpp2
-rw-r--r--boost/align/detail/assume_aligned_intel.hpp2
-rw-r--r--boost/align/detail/assume_aligned_msvc.hpp2
-rw-r--r--boost/align/detail/integral_constant.hpp22
-rw-r--r--boost/align/detail/is_aligned.hpp8
-rw-r--r--boost/align/detail/is_alignment.hpp8
-rw-r--r--boost/align/detail/is_alignment_constant.hpp8
-rw-r--r--boost/align/detail/max_align.hpp17
-rw-r--r--boost/align/detail/max_objects.hpp (renamed from boost/align/detail/max_count_of.hpp)14
-rw-r--r--boost/align/detail/max_size.hpp28
-rw-r--r--boost/align/detail/min_size.hpp8
-rw-r--r--boost/align/detail/offset_object.hpp26
-rw-r--r--boost/align/detail/remove_traits.hpp8
31 files changed, 157 insertions, 150 deletions
diff --git a/boost/align/detail/address.hpp b/boost/align/detail/address.hpp
index 63be1a95d0..b38e571534 100644
--- a/boost/align/detail/address.hpp
+++ b/boost/align/detail/address.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -17,13 +17,13 @@ namespace alignment {
namespace detail {
#if defined(BOOST_HAS_INTPTR_T)
-typedef boost::uintptr_t address_t;
+typedef boost::uintptr_t address;
#else
-typedef std::size_t address_t;
+typedef std::size_t address;
#endif
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/addressof.hpp b/boost/align/detail/addressof.hpp
index 8f0c88204e..50731a70d0 100644
--- a/boost/align/detail/addressof.hpp
+++ b/boost/align/detail/addressof.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -27,8 +27,8 @@ using std::addressof;
using boost::addressof;
#endif
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/align.hpp b/boost/align/detail/align.hpp
index 00be6fd6aa..d2404b3e6d 100644
--- a/boost/align/detail/align.hpp
+++ b/boost/align/detail/align.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,7 +21,7 @@ inline void* align(std::size_t alignment, std::size_t size,
void*& ptr, std::size_t& space)
{
BOOST_ASSERT(detail::is_alignment(alignment));
- std::size_t n = detail::address_t(ptr) & (alignment - 1);
+ std::size_t n = detail::address(ptr) & (alignment - 1);
if (n != 0) {
n = alignment - n;
}
@@ -34,7 +34,7 @@ inline void* align(std::size_t alignment, std::size_t size,
return p;
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/align_cxx11.hpp b/boost/align/detail/align_cxx11.hpp
index 80dc7e36a4..a95b84c70f 100644
--- a/boost/align/detail/align_cxx11.hpp
+++ b/boost/align/detail/align_cxx11.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -16,7 +16,7 @@ namespace alignment {
using std::align;
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc.hpp b/boost/align/detail/aligned_alloc.hpp
index 1852ac15a6..28c0d2938e 100644
--- a/boost/align/detail/aligned_alloc.hpp
+++ b/boost/align/detail/aligned_alloc.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014-2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -48,7 +48,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
}
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc_android.hpp b/boost/align/detail/aligned_alloc_android.hpp
index d97d67989e..2381d8be9c 100644
--- a/boost/align/detail/aligned_alloc_android.hpp
+++ b/boost/align/detail/aligned_alloc_android.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -30,7 +30,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
::free(ptr);
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc_macos.hpp b/boost/align/detail/aligned_alloc_macos.hpp
index 9b6d235133..da3270b084 100644
--- a/boost/align/detail/aligned_alloc_macos.hpp
+++ b/boost/align/detail/aligned_alloc_macos.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -22,7 +22,7 @@ inline void* aligned_alloc(std::size_t alignment, std::size_t size)
BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- if (!size) {
+ if (size == 0) {
return 0;
}
if (alignment < sizeof(void*)) {
@@ -40,7 +40,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
::free(ptr);
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc_msvc.hpp b/boost/align/detail/aligned_alloc_msvc.hpp
index 1cb7f2a3a1..92f4291893 100644
--- a/boost/align/detail/aligned_alloc_msvc.hpp
+++ b/boost/align/detail/aligned_alloc_msvc.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -30,7 +30,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
::_aligned_free(ptr);
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc_posix.hpp b/boost/align/detail/aligned_alloc_posix.hpp
index 3743652cbd..df64d75da3 100644
--- a/boost/align/detail/aligned_alloc_posix.hpp
+++ b/boost/align/detail/aligned_alloc_posix.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -37,7 +37,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
::free(ptr);
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/aligned_alloc_sunos.hpp b/boost/align/detail/aligned_alloc_sunos.hpp
index c5778cdd75..0114597bad 100644
--- a/boost/align/detail/aligned_alloc_sunos.hpp
+++ b/boost/align/detail/aligned_alloc_sunos.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -30,7 +30,7 @@ inline void aligned_free(void* ptr) BOOST_NOEXCEPT
::free(ptr);
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of.hpp b/boost/align/detail/alignment_of.hpp
index b1d2d56920..2a630e9784 100644
--- a/boost/align/detail/alignment_of.hpp
+++ b/boost/align/detail/alignment_of.hpp
@@ -1,6 +1,6 @@
/*
-(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+(c) 2014-2015 Glen Joseph Fernandes
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -10,20 +10,25 @@ http://boost.org/LICENSE_1_0.txt
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
#include <boost/align/detail/min_size.hpp>
-#include <boost/align/detail/offset_object.hpp>
namespace boost {
namespace alignment {
namespace detail {
template<class T>
+struct alignof_helper {
+ char value;
+ T object;
+};
+
+template<class T>
struct alignment_of
: min_size<sizeof(T),
- sizeof(offset_object<T>) - sizeof(T)>::type {
+ sizeof(alignof_helper<T>) - sizeof(T)>::type {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of_clang.hpp b/boost/align/detail/alignment_of_clang.hpp
index fa96a37d9d..a8e2a349d6 100644
--- a/boost/align/detail/alignment_of_clang.hpp
+++ b/boost/align/detail/alignment_of_clang.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,8 +21,8 @@ struct alignment_of
: integral_constant<std::size_t, __alignof(T)> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of_codegear.hpp b/boost/align/detail/alignment_of_codegear.hpp
index e8986cef66..8875e6c424 100644
--- a/boost/align/detail/alignment_of_codegear.hpp
+++ b/boost/align/detail/alignment_of_codegear.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,8 +21,8 @@ struct alignment_of
: integral_constant<std::size_t, alignof(T)> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of_cxx11.hpp b/boost/align/detail/alignment_of_cxx11.hpp
index 0f66098b67..cbe2d9e7a8 100644
--- a/boost/align/detail/alignment_of_cxx11.hpp
+++ b/boost/align/detail/alignment_of_cxx11.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -17,8 +17,8 @@ namespace detail {
using std::alignment_of;
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of_gcc.hpp b/boost/align/detail/alignment_of_gcc.hpp
index 615968b477..0812fde8e4 100644
--- a/boost/align/detail/alignment_of_gcc.hpp
+++ b/boost/align/detail/alignment_of_gcc.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,8 +21,8 @@ struct alignment_of
: integral_constant<std::size_t, __alignof__(T)> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/alignment_of_msvc.hpp b/boost/align/detail/alignment_of_msvc.hpp
index 87d6ac8e28..df6912f411 100644
--- a/boost/align/detail/alignment_of_msvc.hpp
+++ b/boost/align/detail/alignment_of_msvc.hpp
@@ -1,6 +1,6 @@
/*
-(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+(c) 2014-2015 Glen Joseph Fernandes
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -10,19 +10,26 @@ http://boost.org/LICENSE_1_0.txt
#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP
#include <boost/align/detail/min_size.hpp>
-#include <boost/align/detail/offset_object.hpp>
namespace boost {
namespace alignment {
namespace detail {
template<class T>
+struct alignof_helper {
+ T first;
+ char value;
+ T second;
+};
+
+template<class T>
struct alignment_of
- : min_size<sizeof(T), offsetof(offset_object<T>, object)>::type {
+ : min_size<sizeof(T),
+ sizeof(alignof_helper<T>) - (sizeof(T) << 1)>::type {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/assume_aligned.hpp b/boost/align/detail/assume_aligned.hpp
index 0ecefa1dd0..cf77086624 100644
--- a/boost/align/detail/assume_aligned.hpp
+++ b/boost/align/detail/assume_aligned.hpp
@@ -3,7 +3,7 @@
(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI
(c) 2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
diff --git a/boost/align/detail/assume_aligned_clang.hpp b/boost/align/detail/assume_aligned_clang.hpp
index d72b4cae86..2ba41c6970 100644
--- a/boost/align/detail/assume_aligned_clang.hpp
+++ b/boost/align/detail/assume_aligned_clang.hpp
@@ -1,6 +1,6 @@
/*
(c) 2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -9,11 +9,9 @@ http://boost.org/LICENSE_1_0.txt
#ifndef BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP
#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP
-#include <stdint.h>
-
-#if defined(__has_builtin) && __has_builtin(__builtin_assume)
+#if __has_builtin(__builtin_assume_aligned)
#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \
-__builtin_assume((uintptr_t(ptr) & ((alignment) - 1)) == 0)
+(ptr) = __builtin_assume_aligned((ptr), (alignment))
#else
#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment)
#endif
diff --git a/boost/align/detail/assume_aligned_gcc.hpp b/boost/align/detail/assume_aligned_gcc.hpp
index a1e6cb0280..f7a545851c 100644
--- a/boost/align/detail/assume_aligned_gcc.hpp
+++ b/boost/align/detail/assume_aligned_gcc.hpp
@@ -3,7 +3,7 @@
(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI
(c) 2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
diff --git a/boost/align/detail/assume_aligned_intel.hpp b/boost/align/detail/assume_aligned_intel.hpp
index aaaf331802..e9ec2dbeb4 100644
--- a/boost/align/detail/assume_aligned_intel.hpp
+++ b/boost/align/detail/assume_aligned_intel.hpp
@@ -3,7 +3,7 @@
(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI
(c) 2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
diff --git a/boost/align/detail/assume_aligned_msvc.hpp b/boost/align/detail/assume_aligned_msvc.hpp
index fdad429b08..97c1fb1add 100644
--- a/boost/align/detail/assume_aligned_msvc.hpp
+++ b/boost/align/detail/assume_aligned_msvc.hpp
@@ -3,7 +3,7 @@
(c) 2015 LRI UMR 8623 CNRS/University Paris Sud XI
(c) 2015 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
diff --git a/boost/align/detail/integral_constant.hpp b/boost/align/detail/integral_constant.hpp
index 6116fea5f5..3f8bf0a8d9 100644
--- a/boost/align/detail/integral_constant.hpp
+++ b/boost/align/detail/integral_constant.hpp
@@ -1,6 +1,6 @@
/*
-(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+(c) 2014-2015 Glen Joseph Fernandes
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -25,24 +25,18 @@ using std::integral_constant;
template<class T, T Value>
struct integral_constant {
typedef T value_type;
- typedef integral_constant<T, Value> type;
+ typedef integral_constant type;
-#if !defined(BOOST_NO_CXX11_CONSTEXPR)
- constexpr operator value_type() const {
+ BOOST_CONSTEXPR operator value_type() const {
return Value;
}
- static constexpr T value = Value;
-#else
- enum {
- value = Value
- };
-#endif
+ static BOOST_CONSTEXPR_OR_CONST T value = Value;
};
#endif
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/is_aligned.hpp b/boost/align/detail/is_aligned.hpp
index a861e9f4c8..cb45be3433 100644
--- a/boost/align/detail/is_aligned.hpp
+++ b/boost/align/detail/is_aligned.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -22,10 +22,10 @@ inline bool is_aligned(std::size_t alignment, const void* ptr)
BOOST_NOEXCEPT
{
BOOST_ASSERT(detail::is_alignment(alignment));
- return (detail::address_t(ptr) & (alignment - 1)) == 0;
+ return (detail::address(ptr) & (alignment - 1)) == 0;
}
-} /* :alignment */
-} /* :boost */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/is_alignment.hpp b/boost/align/detail/is_alignment.hpp
index 7ac0bb3d12..12d8df974f 100644
--- a/boost/align/detail/is_alignment.hpp
+++ b/boost/align/detail/is_alignment.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -22,8 +22,8 @@ BOOST_CONSTEXPR inline bool is_alignment(std::size_t value)
return (value > 0) && ((value & (value - 1)) == 0);
}
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/is_alignment_constant.hpp b/boost/align/detail/is_alignment_constant.hpp
index 4c703cafc0..2c29343b2d 100644
--- a/boost/align/detail/is_alignment_constant.hpp
+++ b/boost/align/detail/is_alignment_constant.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,8 +21,8 @@ struct is_alignment_constant
: integral_constant<bool, (N > 0) && ((N & (N - 1)) == 0)> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/max_align.hpp b/boost/align/detail/max_align.hpp
index 4351a5a2ed..daa0413935 100644
--- a/boost/align/detail/max_align.hpp
+++ b/boost/align/detail/max_align.hpp
@@ -1,6 +1,6 @@
/*
-(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+(c) 2014-2015 Glen Joseph Fernandes
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -9,20 +9,21 @@ http://boost.org/LICENSE_1_0.txt
#ifndef BOOST_ALIGN_DETAIL_MAX_ALIGN_HPP
#define BOOST_ALIGN_DETAIL_MAX_ALIGN_HPP
-#include <boost/align/detail/integral_constant.hpp>
+#include <boost/align/detail/max_size.hpp>
+#include <boost/align/alignment_of.hpp>
#include <cstddef>
namespace boost {
namespace alignment {
namespace detail {
-template<std::size_t A, std::size_t B>
+template<class A, class B>
struct max_align
- : integral_constant<std::size_t, (A > B) ? A : B> {
+ : max_size<alignment_of<A>::value, alignment_of<B>::value>::type {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/max_count_of.hpp b/boost/align/detail/max_objects.hpp
index e0ae3bce96..eb56d6fe66 100644
--- a/boost/align/detail/max_count_of.hpp
+++ b/boost/align/detail/max_objects.hpp
@@ -1,13 +1,13 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
http://boost.org/LICENSE_1_0.txt
*/
-#ifndef BOOST_ALIGN_DETAIL_MAX_COUNT_OF_HPP
-#define BOOST_ALIGN_DETAIL_MAX_COUNT_OF_HPP
+#ifndef BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP
+#define BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP
#include <boost/align/detail/integral_constant.hpp>
#include <cstddef>
@@ -17,13 +17,13 @@ namespace alignment {
namespace detail {
template<class T>
-struct max_count_of
+struct max_objects
: integral_constant<std::size_t,
~static_cast<std::size_t>(0) / sizeof(T)> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/max_size.hpp b/boost/align/detail/max_size.hpp
new file mode 100644
index 0000000000..48fc45e2ee
--- /dev/null
+++ b/boost/align/detail/max_size.hpp
@@ -0,0 +1,28 @@
+/*
+(c) 2014-2015 Glen Joseph Fernandes
+<glenjofe -at- gmail.com>
+
+Distributed under the Boost Software
+License, Version 1.0.
+http://boost.org/LICENSE_1_0.txt
+*/
+#ifndef BOOST_ALIGN_DETAIL_MAX_SIZE_HPP
+#define BOOST_ALIGN_DETAIL_MAX_SIZE_HPP
+
+#include <boost/align/detail/integral_constant.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace alignment {
+namespace detail {
+
+template<std::size_t A, std::size_t B>
+struct max_size
+ : integral_constant<std::size_t, (A > B) ? A : B> {
+};
+
+} /* .detail */
+} /* .alignment */
+} /* .boost */
+
+#endif
diff --git a/boost/align/detail/min_size.hpp b/boost/align/detail/min_size.hpp
index 71afe8c686..8ed3e87ab6 100644
--- a/boost/align/detail/min_size.hpp
+++ b/boost/align/detail/min_size.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -21,8 +21,8 @@ struct min_size
: integral_constant<std::size_t, (A < B) ? A : B> {
};
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif
diff --git a/boost/align/detail/offset_object.hpp b/boost/align/detail/offset_object.hpp
deleted file mode 100644
index 2055edfb4a..0000000000
--- a/boost/align/detail/offset_object.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
-
-Distributed under the Boost Software
-License, Version 1.0.
-http://boost.org/LICENSE_1_0.txt
-*/
-#ifndef BOOST_ALIGN_DETAIL_OFFSET_OBJECT_HPP
-#define BOOST_ALIGN_DETAIL_OFFSET_OBJECT_HPP
-
-namespace boost {
-namespace alignment {
-namespace detail {
-
-template<class T>
-struct offset_object {
- char offset;
- T object;
-};
-
-} /* :detail */
-} /* :alignment */
-} /* :boost */
-
-#endif
diff --git a/boost/align/detail/remove_traits.hpp b/boost/align/detail/remove_traits.hpp
index f59d6bf9e8..86a98d459a 100644
--- a/boost/align/detail/remove_traits.hpp
+++ b/boost/align/detail/remove_traits.hpp
@@ -1,6 +1,6 @@
/*
(c) 2014 Glen Joseph Fernandes
-glenjofe at gmail dot com
+<glenjofe -at- gmail.com>
Distributed under the Boost Software
License, Version 1.0.
@@ -85,8 +85,8 @@ struct remove_cv {
};
#endif
-} /* :detail */
-} /* :alignment */
-} /* :boost */
+} /* .detail */
+} /* .alignment */
+} /* .boost */
#endif