owner_less.hpp 853 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED
  3. //
  4. // owner_less.hpp
  5. //
  6. // Copyright (c) 2008 Frank Mori Hess
  7. // Copyright (c) 2016 Peter Dimov
  8. //
  9. // Distributed under the Boost Software License, Version 1.0. (See
  10. // accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt)
  12. //
  13. // See http://www.boost.org/libs/smart_ptr/ for documentation.
  14. //
  15. #include <boost/config.hpp>
  16. namespace boost
  17. {
  18. template<class T = void> struct owner_less
  19. {
  20. typedef bool result_type;
  21. typedef T first_argument_type;
  22. typedef T second_argument_type;
  23. template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
  24. {
  25. return u.owner_before( v );
  26. }
  27. };
  28. } // namespace boost
  29. #endif // #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED