Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / align / detail / alignment_of.hpp
1 /*
2  (c) 2014 Glen Joseph Fernandes
3  glenjofe at gmail dot com
4
5  Distributed under the Boost Software
6  License, Version 1.0.
7  http://boost.org/LICENSE_1_0.txt
8 */
9 #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
10 #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP
11
12 #include <boost/align/detail/min_size.hpp>
13 #include <boost/align/detail/offset_object.hpp>
14
15 namespace boost {
16     namespace alignment {
17         namespace detail {
18             template<class T>
19             struct alignment_of
20                 : min_size<sizeof(T),
21                     sizeof(offset_object<T>) - sizeof(T)>::type {
22             };
23         }
24     }
25 }
26
27 #endif