source: NonGTP/Boost/boost/type_traits/is_stateless.hpp @ 857

Revision 857, 1.5 KB checked in by igarcia, 18 years ago (diff)
Line 
1
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 "boost/type_traits/has_trivial_constructor.hpp"
13#include "boost/type_traits/has_trivial_copy.hpp"
14#include "boost/type_traits/has_trivial_destructor.hpp"
15#include "boost/type_traits/is_class.hpp"
16#include "boost/type_traits/is_empty.hpp"
17#include "boost/type_traits/detail/ice_and.hpp"
18#include "boost/config.hpp"
19
20// should be the last #include
21#include "boost/type_traits/detail/bool_trait_def.hpp"
22
23namespace boost {
24
25namespace detail {
26
27template <typename T>
28struct is_stateless_impl
29{
30  BOOST_STATIC_CONSTANT(bool, value =
31    (::boost::type_traits::ice_and<
32       ::boost::has_trivial_constructor<T>::value,
33       ::boost::has_trivial_copy<T>::value,
34       ::boost::has_trivial_destructor<T>::value,
35       ::boost::is_class<T>::value,
36       ::boost::is_empty<T>::value
37     >::value));
38};
39
40} // namespace detail
41
42BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl<T>::value)
43
44} // namespace boost
45
46#include "boost/type_traits/detail/bool_trait_undef.hpp"
47
48#endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED
Note: See TracBrowser for help on using the repository browser.