blob: a9b18dcc757ab09d61cf622d7b9be3929866de7c [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6//
7// See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
9#ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED
10#define BOOST_TT_IS_STATELESS_HPP_INCLUDED
11
12#include <ndnboost/type_traits/has_trivial_constructor.hpp>
13#include <ndnboost/type_traits/has_trivial_copy.hpp>
14#include <ndnboost/type_traits/has_trivial_destructor.hpp>
15#include <ndnboost/type_traits/is_class.hpp>
16#include <ndnboost/type_traits/is_empty.hpp>
17#include <ndnboost/type_traits/detail/ice_and.hpp>
18#include <ndnboost/config.hpp>
19
20// should be the last #include
21#include <ndnboost/type_traits/detail/bool_trait_def.hpp>
22
23namespace ndnboost {
24
25namespace detail {
26
27template <typename T>
28struct is_stateless_impl
29{
30 BOOST_STATIC_CONSTANT(bool, value =
31 (::ndnboost::type_traits::ice_and<
32 ::ndnboost::has_trivial_constructor<T>::value,
33 ::ndnboost::has_trivial_copy<T>::value,
34 ::ndnboost::has_trivial_destructor<T>::value,
35 ::ndnboost::is_class<T>::value,
36 ::ndnboost::is_empty<T>::value
37 >::value));
38};
39
40} // namespace detail
41
42BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::ndnboost::detail::is_stateless_impl<T>::value)
43
44} // namespace ndnboost
45
46#include <ndnboost/type_traits/detail/bool_trait_undef.hpp>
47
48#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED