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