1 /* 2 Copyright 2014-2015 Glen Joseph Fernandes 3 (glenjofe@gmail.com) 4 5 Distributed under the Boost Software License, Version 1.0. 6 (http://www.boost.org/LICENSE_1_0.txt) 7 */ 8 #ifndef BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP 9 #define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP 10 11 #include <boost/align/detail/min_size.hpp> 12 13 namespace boost { 14 namespace alignment { 15 namespace detail { 16 17 template<class T> 18 struct offset_value { 19 char value; 20 T object; 21 }; 22 23 template<class T> 24 struct alignment_of 25 : min_size<sizeof(T), sizeof(offset_value<T>) - sizeof(T)> { }; 26 27 } /* detail */ 28 } /* alignment */ 29 } /* boost */ 30 31 #endif 32