File indexing completed on 2025-01-18 09:30:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP
0011 #define BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP
0012
0013 #ifndef BOOST_CONFIG_HPP
0014 # include <boost/config.hpp>
0015 #endif
0016
0017 #if defined(BOOST_HAS_PRAGMA_ONCE)
0018 # pragma once
0019 #endif
0020
0021 #include <boost/container/detail/config_begin.hpp>
0022 #include <boost/container/detail/workaround.hpp>
0023
0024 namespace boost {
0025 namespace container {
0026
0027 template<class Key, class Mapped>
0028 struct pair_key_mapped_of_value
0029 {
0030 typedef Key key_type;
0031 typedef Mapped mapped_type;
0032
0033 template<class Pair>
0034 const key_type & key_of_value(const Pair &p) const
0035 { return p.first; }
0036
0037 template<class Pair>
0038 const mapped_type & mapped_of_value(const Pair &p) const
0039 { return p.second; }
0040
0041 template<class Pair>
0042 key_type & key_of_value(Pair &p) const
0043 { return const_cast<key_type&>(p.first); }
0044
0045 template<class Pair>
0046 mapped_type & mapped_of_value(Pair &p) const
0047 { return p.second; }
0048
0049 };
0050
0051 }}
0052
0053 #include <boost/container/detail/config_end.hpp>
0054
0055 #endif