PageRenderTime 22ms CodeModel.GetById 16ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/variant/detail/has_trivial_move.hpp

http://hadesmem.googlecode.com/
C++ Header | 100 lines | 68 code | 22 blank | 10 comment | 0 complexity | 7da66d2b70641c4e3b8d357a3525714b MD5 | raw file
  1
  2// (C) Copyright Eric Friedman 2002-2003.
  3// Distributed under the Boost Software License, Version 1.0. (See
  4// 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 for most recent version including documentation.
  8
  9#ifndef BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED
 10#define BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED
 11
 12#include "boost/config.hpp" // for STATIC_CONSTANT
 13#include "boost/type_traits/has_trivial_copy.hpp"
 14#include "boost/type_traits/has_trivial_assign.hpp"
 15
 16#include "boost/mpl/and.hpp"
 17#include "boost/mpl/or.hpp"
 18
 19// should be the last #include
 20#include "boost/variant/detail/bool_trait_def.hpp"
 21
 22namespace boost {
 23namespace detail { namespace variant {
 24
 25// TRAIT: has_trivial_move
 26
 27template <typename T>
 28struct has_trivial_move_impl
 29{
 30    BOOST_STATIC_CONSTANT(
 31        bool, value = (
 32            ::boost::mpl::and_<
 33              has_trivial_copy<T>
 34            , has_trivial_assign<T>
 35            >::type::value
 36            )
 37        );
 38};
 39
 40BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
 41      has_trivial_move
 42    , T
 43    , (::boost::detail::variant::has_trivial_move_impl<T>::value)
 44    )
 45
 46
 47// TRAIT: has_trivial_move_constructor
 48
 49template <typename T>
 50struct has_trivial_move_constructor_impl
 51{
 52    BOOST_STATIC_CONSTANT(
 53        bool, value = (
 54            ::boost::mpl::or_<
 55              has_trivial_move<T>
 56            , has_trivial_copy<T>
 57            >::type::value
 58            )
 59        );
 60};
 61
 62BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
 63      has_trivial_move_constructor
 64    , T
 65    , (::boost::detail::variant::has_trivial_move_constructor_impl<T>::value)
 66    )
 67
 68
 69// TRAIT: has_trivial_move_assign
 70
 71template <typename T>
 72struct has_trivial_move_assign_impl
 73{
 74    BOOST_STATIC_CONSTANT(
 75        bool, value = (
 76            ::boost::mpl::or_<
 77              has_trivial_move<T>
 78            , has_trivial_assign<T>
 79            >::type::value
 80            )
 81        );
 82};
 83
 84BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(
 85      has_trivial_move_assign
 86    , T
 87    , (::boost::detail::variant::has_trivial_move_assign_impl<T>::value)
 88    )
 89
 90}} // namespace detail::variant
 91
 92BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move)
 93BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_constructor)
 94BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(1,::boost::detail::variant::has_trivial_move_assign)
 95
 96} // namespace boost
 97
 98#include "boost/variant/detail/bool_trait_undef.hpp"
 99
100#endif // BOOST_VARIANT_DETAIL_HAS_TRIVIAL_MOVE_HPP_INCLUDED