Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/boost/intrusive/detail/equal_to_value.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  2014-2014
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_EQUAL_TO_VALUE_HPP
0014 #define BOOST_INTRUSIVE_DETAIL_EQUAL_TO_VALUE_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 #include <boost/intrusive/detail/workaround.hpp>
0025 
0026 namespace boost {
0027 namespace intrusive {
0028 namespace detail {
0029 
0030 //This functor compares a stored value
0031 //and the one passed as an argument
0032 template<class ConstReference>
0033 class equal_to_value
0034 {
0035    ConstReference t_;
0036 
0037    public:
0038    equal_to_value(ConstReference t)
0039       :  t_(t)
0040    {}
0041 
0042    inline bool operator()(ConstReference t)const
0043    {  return t_ == t;   }
0044 };
0045 
0046 }  //namespace detail{
0047 }  //namespace intrusive{
0048 }  //namespace boost{
0049 
0050 #endif //BOOST_INTRUSIVE_DETAIL_EQUAL_TO_VALUE_HPP