blob: 5f50aeb5b84b5b98822807c2d29b8dd0bc278ab9 [file] [log] [blame]
Brian Silverman355f11d2018-08-04 23:57:00 -07001#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
17namespace boost
18{
19
20template<class T = void> struct owner_less
21{
22 typedef bool result_type;
23 typedef T first_argument_type;
24 typedef T second_argument_type;
25
26 template<class U, class V> bool operator()( U const & u, V const & v ) const
27 {
28 return u.owner_before( v );
29 }
30};
31
32} // namespace boost
33
34#endif // #ifndef BOOST_SMART_PTR_OWNER_LESS_HPP_INCLUDED