#ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED #define BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED // // owner_less.hpp // // Copyright (c) 2008 Frank Mori Hess // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/smart_ptr.htm for documentation. // #include namespace boost { template class shared_ptr; template class weak_ptr; namespace detail { template struct generic_owner_less : public std::binary_function { bool operator()(const T &lhs, const T &rhs) const { return lhs.owner_before(rhs); } bool operator()(const T &lhs, const U &rhs) const { return lhs.owner_before(rhs); } bool operator()(const U &lhs, const T &rhs) const { return lhs.owner_before(rhs); } }; } // namespace detail template struct owner_less; template struct owner_less >: public detail::generic_owner_less, weak_ptr > {}; template struct owner_less >: public detail::generic_owner_less, shared_ptr > {}; } // namespace boost #endif // #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED