1/////////////////////////////////////////////////////////////////////////////
2//
3// (C) Copyright Ion Gaztanaga 2014-2014
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9// See http://www.boost.org/libs/intrusive for documentation.
10//
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef BOOST_INTRUSIVE_DETAIL_EQUAL_TO_VALUE_HPP
14#define BOOST_INTRUSIVE_DETAIL_EQUAL_TO_VALUE_HPP
15
16#ifndef BOOST_CONFIG_HPP
17# include <boost/config.hpp>
18#endif
19
20#if defined(BOOST_HAS_PRAGMA_ONCE)
21# pragma once
22#endif
23
24#include <boost/intrusive/detail/workaround.hpp>
25
26namespace boost {
27namespace intrusive {
28namespace detail {
29
30//This functor compares a stored value
31//and the one passed as an argument
32template<class ConstReference>
33class equal_to_value
34{
35 ConstReference t_;
36
37 public:
38 equal_to_value(ConstReference t)
39 : t_(t)
40 {}
41
42 BOOST_INTRUSIVE_FORCEINLINE bool operator()(ConstReference t)const
43 { return t_ == t; }
44};
45
46} //namespace detail{
47} //namespace intrusive{
48} //namespace boost{
49
50#endif //BOOST_INTRUSIVE_DETAIL_EQUAL_TO_VALUE_HPP
51