1 // Copyright David Abrahams 2002.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 #ifndef MAP_ENTRY_DWA2002118_HPP
6 # define MAP_ENTRY_DWA2002118_HPP
8 namespace boost { namespace python { namespace detail {
10 // A trivial type that works well as the value_type of associative
12 template <class Key, class Value>
16 map_entry(Key k) : key(k), value() {}
17 map_entry(Key k, Value v) : key(k), value(v) {}
19 bool operator<(map_entry const& rhs) const
21 return this->key < rhs.key;
28 template <class Key, class Value>
29 bool operator<(map_entry<Key,Value> const& e, Key const& k)
34 template <class Key, class Value>
35 bool operator<(Key const& k, map_entry<Key,Value> const& e)
41 }}} // namespace boost::python::detail
43 #endif // MAP_ENTRY_DWA2002118_HPP