value_functors.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
  2. #define BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
  3. ///////////////////////////////////////////////////////////////////////////////
  4. //
  5. // (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/container for documentation.
  10. //
  11. ///////////////////////////////////////////////////////////////////////////////
  12. #ifndef BOOST_CONFIG_HPP
  13. # include <boost/config.hpp>
  14. #endif
  15. #if defined(BOOST_HAS_PRAGMA_ONCE)
  16. # pragma once
  17. #endif
  18. //Functors for member algorithm defaults
  19. template<class ValueType>
  20. struct value_less
  21. {
  22. bool operator()(const ValueType &a, const ValueType &b) const
  23. { return a < b; }
  24. };
  25. template<class ValueType>
  26. struct value_equal
  27. {
  28. bool operator()(const ValueType &a, const ValueType &b) const
  29. { return a == b; }
  30. };
  31. #endif //BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP