owner_equal_to.hpp 671 B

123456789101112131415161718192021222324252627
  1. #ifndef BOOST_SMART_PTR_OWNER_EQUAL_TO_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_OWNER_EQUAL_TO_HPP_INCLUDED
  3. // Copyright 2020 Peter Dimov
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // https://www.boost.org/LICENSE_1_0.txt
  6. #include <boost/config.hpp>
  7. namespace boost
  8. {
  9. template<class T = void> struct owner_equal_to
  10. {
  11. typedef bool result_type;
  12. typedef T first_argument_type;
  13. typedef T second_argument_type;
  14. template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
  15. {
  16. return u.owner_equals( v );
  17. }
  18. };
  19. } // namespace boost
  20. #endif // #ifndef BOOST_SMART_PTR_OWNER_EQUAL_TO_HPP_INCLUDED