Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:43

0001 /////////////////////////////////////////////////////////////////////////////
0002 //
0003 // (C) Copyright Ion Gaztanaga 2008
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_PRIORITY_COMPARE_HPP
0014 #define BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
0015 
0016 #include <boost/intrusive/detail/config_begin.hpp>
0017 #include <boost/intrusive/detail/workaround.hpp>
0018 #include <boost/intrusive/intrusive_fwd.hpp>
0019 
0020 #include <boost/intrusive/detail/minimal_less_equal_header.hpp>
0021 
0022 #if defined(BOOST_HAS_PRAGMA_ONCE)
0023 #  pragma once
0024 #endif
0025 
0026 namespace boost {
0027 namespace intrusive {
0028 
0029 /// @cond
0030 
0031 namespace adldft {
0032 
0033 template<class T, class U>
0034 BOOST_INTRUSIVE_FORCEINLINE bool priority_order(const T &t, const U &u)
0035 {  return t < u;  }
0036 
0037 }  //namespace adldft {
0038 
0039 /// @endcond
0040 
0041 template <class T = void>
0042 struct priority_compare
0043 {
0044    //Compatibility with std::binary_function
0045    typedef T      first_argument_type;
0046    typedef T      second_argument_type;
0047    typedef bool   result_type;
0048 
0049    BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
0050    {
0051       using adldft::priority_order;
0052       return priority_order(val, val2);
0053    }
0054 };
0055 
0056 template <>
0057 struct priority_compare<void>
0058 {
0059    template<class T, class U>
0060    BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
0061    {
0062       using adldft::priority_order;
0063       return priority_order(t, u);
0064    }
0065 };
0066 
0067 /// @cond
0068 
0069 template<class PrioComp, class T>
0070 struct get_prio_comp
0071 {
0072    typedef PrioComp type;
0073 };
0074 
0075 
0076 template<class T>
0077 struct get_prio_comp<void, T>
0078 {
0079    typedef ::boost::intrusive::priority_compare<T> type;
0080 };
0081 
0082 /// @endcond
0083 
0084 } //namespace intrusive
0085 } //namespace boost
0086 
0087 #include <boost/intrusive/detail/config_end.hpp>
0088 
0089 #endif //BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP