]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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 support/key_type_by.hpp | |
10 | /// \brief Metafunction to access the set types of a bimap | |
11 | ||
12 | #ifndef BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP | |
13 | #define BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP | |
14 | ||
15 | #if defined(_MSC_VER) | |
16 | #pragma once | |
17 | #endif | |
18 | ||
19 | #include <boost/config.hpp> | |
20 | ||
21 | #include <boost/bimap/relation/detail/metadata_access_builder.hpp> | |
22 | ||
23 | /** \struct boost::bimaps::support::key_type_by | |
24 | ||
25 | \brief Metafunction to obtain the key type of one of the sides in a bimap | |
26 | ||
27 | The tag parameter can be either a user defined tag or \c member_at::{side}. | |
28 | The returned type is one of the {SetType}_of definition classes. | |
29 | ||
30 | \code | |
31 | ||
32 | template< class Tag, class Bimap > | |
33 | struct key_type_by | |
34 | { | |
35 | typedef typename Bimap::{side}_key_type type; | |
36 | }; | |
37 | ||
38 | \endcode | |
39 | ||
40 | See also member_at. | |
41 | \ingroup bimap_group | |
42 | **/ | |
43 | ||
44 | ||
45 | namespace boost { | |
46 | namespace bimaps { | |
47 | namespace support { | |
48 | ||
49 | // Implementation of key type type of metafunction | |
50 | ||
51 | BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER | |
52 | ( | |
53 | key_type_by, | |
54 | left_key_type, | |
55 | right_key_type | |
56 | ) | |
57 | ||
58 | ||
59 | } // namespace support | |
60 | } // namespace bimaps | |
61 | } // namespace boost | |
62 | ||
63 | #endif // BOOST_BIMAP_SUPPORT_KEY_TYPE_BY_HPP | |
64 |