2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2014-01-08 07:48:12 +00:00
|
|
|
Copyright (c) 2011-2014 Bolero MURAKAMI
|
2013-08-08 09:54:33 +00:00
|
|
|
https://github.com/bolero-MURAKAMI/Sprout
|
|
|
|
|
|
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
=============================================================================*/
|
2013-05-12 02:05:31 +00:00
|
|
|
#ifndef SPROUT_DETAIL_SIZEOF_HPP
|
|
|
|
#define SPROUT_DETAIL_SIZEOF_HPP
|
|
|
|
|
|
|
|
#include <type_traits>
|
|
|
|
#include <sprout/config.hpp>
|
2014-04-30 07:30:26 +00:00
|
|
|
#include <sprout/workaround/std/cstddef.hpp>
|
2013-11-22 12:11:08 +00:00
|
|
|
#include <sprout/type_traits/integral_constant.hpp>
|
2013-05-12 02:05:31 +00:00
|
|
|
|
|
|
|
namespace sprout {
|
|
|
|
namespace detail {
|
2013-11-22 12:11:08 +00:00
|
|
|
template<typename T>
|
|
|
|
struct sizeof_
|
|
|
|
: public sprout::integral_constant<std::size_t, sizeof(T)>
|
|
|
|
{};
|
|
|
|
|
2013-05-12 02:05:31 +00:00
|
|
|
template<typename... Ts>
|
|
|
|
struct sizeof_pack
|
2013-11-22 12:11:08 +00:00
|
|
|
: public sprout::integral_constant<std::size_t, sizeof...(Ts)>
|
2013-05-12 02:05:31 +00:00
|
|
|
{};
|
|
|
|
} // namespace detail
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_DETAIL_SIZEOF_HPP
|