////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP #define BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP #ifndef BOOST_CONFIG_HPP # include #endif #if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif #include #include namespace boost { namespace container { template struct pair_key_mapped_of_value { typedef Key key_type; typedef Mapped mapped_type; template const key_type & key_of_value(const Pair &p) const { return p.first; } template const mapped_type & mapped_of_value(const Pair &p) const { return p.second; } template key_type & key_of_value(Pair &p) const { return const_cast(p.first); } template mapped_type & mapped_of_value(Pair &p) const { return p.second; } }; }} #include #endif // BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP