Add Boost.Test karmic valgrind suppressions
[senf.git] / boost_ext / boost / bimap / container_adaptor / detail / key_extractor.hpp
1 // Boost.Bimap
2 //
3 // Copyright (c) 2006-2007 Matias Capeletto
4 //
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8
9 /// \file container_adaptor/detail/key_extractor.hpp
10 /// \brief Key extractor for a pair<Key,Data>.
11
12 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
13 #define BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
14
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
16 #pragma once
17 #endif
18
19 #include <boost/config.hpp>
20
21 #include <functional>
22
23 namespace boost {
24 namespace bimaps {
25 namespace container_adaptor {
26 namespace detail {
27
28 /// \brief Key Extractor
29
30 template < class T >
31 struct key_from_pair_extractor 
32     : std::unary_function< T, BOOST_DEDUCED_TYPENAME T::first_type >
33 {
34     bool operator()( const T & p ) { return p.first; }
35 };
36
37 } // namespace detail
38 } // namespace container_adaptor
39 } // namespace bimaps
40 } // namespace boost
41
42
43 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
44
45