Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:37

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file container_adaptor/detail/key_extractor.hpp
0010 /// \brief Key extractor for a pair<Key,Data>.
0011 
0012 #ifndef BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
0013 #define BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
0014 
0015 #if defined(_MSC_VER)
0016 #pragma once
0017 #endif
0018 
0019 #include <boost/config.hpp>
0020 
0021 namespace boost {
0022 namespace bimaps {
0023 namespace container_adaptor {
0024 namespace detail {
0025 
0026 /// \brief Key Extractor
0027 
0028 template < class T >
0029 struct key_from_pair_extractor 
0030 {
0031     typedef T argument_type;
0032     typedef BOOST_DEDUCED_TYPENAME T::first_type result_type;
0033 
0034     result_type operator()( const T & p ) { return p.first; }
0035 };
0036 
0037 } // namespace detail
0038 } // namespace container_adaptor
0039 } // namespace bimaps
0040 } // namespace boost
0041 
0042 
0043 #endif // BOOST_BIMAP_CONTAINER_ADAPTOR_DETAIL_KEY_EXTRACTOR_HPP
0044 
0045