Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/intrusive/detail/is_stateful_value_traits.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga  2009-2013.
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 //    (See accompanying file LICENSE_1_0.txt or copy at
0007 //          http://www.boost.org/LICENSE_1_0.txt)
0008 //
0009 // See http://www.boost.org/libs/intrusive for documentation.
0010 //
0011 /////////////////////////////////////////////////////////////////////////////
0012 
0013 #ifndef BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP
0014 #define BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP
0015 
0016 #ifndef BOOST_CONFIG_HPP
0017 #  include <boost/config.hpp>
0018 #endif
0019 
0020 #if defined(BOOST_HAS_PRAGMA_ONCE)
0021 #  pragma once
0022 #endif
0023 
0024 #if defined(_MSC_VER) && (_MSC_VER <= 1310)
0025 
0026 #include <boost/intrusive/detail/mpl.hpp>
0027 
0028 namespace boost {
0029 namespace intrusive {
0030 namespace detail {
0031 
0032 template<class ValueTraits>
0033 struct is_stateful_value_traits
0034 {
0035    static const bool value = !detail::is_empty<ValueTraits>::value;
0036 };
0037 
0038 }}}
0039 
0040 #else
0041 
0042 #include <boost/intrusive/detail/function_detector.hpp>
0043 
0044 BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_node_ptr, boost_intrusive)
0045 BOOST_INTRUSIVE_CREATE_FUNCTION_DETECTOR(to_value_ptr, boost_intrusive)
0046 
0047 namespace boost {
0048 namespace intrusive {
0049 namespace detail {
0050 
0051 template<class ValueTraits>
0052 struct is_stateful_value_traits
0053 {
0054    typedef typename ValueTraits::node_ptr       node_ptr;
0055    typedef typename ValueTraits::pointer        pointer;
0056    typedef typename ValueTraits::value_type     value_type;
0057    typedef typename ValueTraits::const_node_ptr const_node_ptr;
0058    typedef typename ValueTraits::const_pointer  const_pointer;
0059 
0060    typedef ValueTraits value_traits;
0061 
0062    static const bool value =
0063       (boost::intrusive::function_detector::NonStaticFunction ==
0064          (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, node_ptr, to_node_ptr, (value_type&) )))
0065       ||
0066       (boost::intrusive::function_detector::NonStaticFunction ==
0067          (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, pointer, to_value_ptr, (node_ptr) )))
0068       ||
0069       (boost::intrusive::function_detector::NonStaticFunction ==
0070          (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_node_ptr, to_node_ptr, (const value_type&) )))
0071       ||
0072       (boost::intrusive::function_detector::NonStaticFunction ==
0073          (BOOST_INTRUSIVE_DETECT_FUNCTION(ValueTraits, boost_intrusive, const_pointer, to_value_ptr, (const_node_ptr) )))
0074       ;
0075 };
0076 
0077 }}}
0078 
0079 #endif
0080 
0081 #endif   //@ifndef BOOST_INTRUSIVE_DETAIL_IS_STATEFUL_VALUE_TRAITS_HPP