owner_equal_to.hpp 636 B

1234567891011121314151617181920212223242526
  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. namespace boost
  7. {
  8. template<class T = void> struct owner_equal_to
  9. {
  10. typedef bool result_type;
  11. typedef T first_argument_type;
  12. typedef T second_argument_type;
  13. template<class U, class V> bool operator()( U const & u, V const & v ) const noexcept
  14. {
  15. return u.owner_equals( v );
  16. }
  17. };
  18. } // namespace boost
  19. #endif // #ifndef BOOST_SMART_PTR_OWNER_EQUAL_TO_HPP_INCLUDED