true_predicate.hpp 859 B

1234567891011121314151617181920212223242526272829
  1. // Boost.Range library
  2. //
  3. // Copyright Neil Groves 2010. 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_TRUE_PREDICATE_HPP_INCLUDED
  12. #define BOOST_RANGE_TEST_TEST_FUNCTION_TRUE_PREDICATE_HPP_INCLUDED
  13. namespace boost
  14. {
  15. namespace range_test_function
  16. {
  17. struct true_predicate
  18. {
  19. typedef bool result_type;
  20. bool operator()() const { return true; }
  21. template<class Arg> bool operator()(Arg) const { return true; }
  22. template<class Arg1, class Arg2> bool operator()(Arg1,Arg2) const { return true; }
  23. };
  24. }
  25. }
  26. #endif // include guard