1 // Boost.Range library 2 // 3 // Copyright Neil Groves 2009. Use, modification and 4 // distribution is subject to the Boost Software License, Version 5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 // http://www.boost.org/LICENSE_1_0.txt) 7 // 8 // 9 // For more information, see http://www.boost.org/libs/range/ 10 // 11 #ifndef BOOST_RANGE_TEST_TEST_FUNCTION_EQUAL_TO_X_HPP_INCLUDED 12 #define BOOST_RANGE_TEST_TEST_FUNCTION_EQUAL_TO_X_HPP_INCLUDED 13 14 namespace boost 15 { 16 namespace range_test_function 17 { 18 template<class Arg> 19 struct equal_to_x 20 { 21 typedef bool result_type; 22 typedef Arg argument_type; 23 equal_to_xboost::range_test_function::equal_to_x24 explicit equal_to_x(Arg x) : m_x(x) {} operator ()boost::range_test_function::equal_to_x25 bool operator()(Arg x) const { return x == m_x; } 26 27 private: 28 Arg m_x; 29 }; 30 } 31 } 32 33 #endif // include guard 34