value_functors.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
  2. #define BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP
  3. ///////////////////////////////////////////////////////////////////////////////
  4. //
  5. // (C) Copyright Ion Gaztanaga 2017-2021. 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/intrusive 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. namespace boost {
  19. namespace intrusive {
  20. //Functors for member algorithm defaults
  21. template<class ValueType>
  22. struct value_less
  23. {
  24. bool operator()(const ValueType &a, const ValueType &b) const
  25. { return a < b; }
  26. };
  27. template<class ValueType>
  28. struct value_equal
  29. {
  30. bool operator()(const ValueType &a, const ValueType &b) const
  31. { return a == b; }
  32. };
  33. } //namespace intrusive {
  34. } //namespace boost {
  35. #endif //BOOST_INTRUSIVE_DETAIL_VALUE_FUNCTORS_HPP