Add Boost.Test karmic valgrind suppressions
[senf.git] / boost / bimap / support / data_type_by.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 support/data_type_by.hpp
10 /// \brief Metafunction to access the data types of a bimap
11
12 #ifndef BOOST_BIMAP_SUPPORT_DATA_TYPE_BY_HPP
13 #define BOOST_BIMAP_SUPPORT_DATA_TYPE_BY_HPP
14
15 #if defined(_MSC_VER) && (_MSC_VER>=1200)
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::data_type_by
24
25 \brief Metafunction to obtain the data 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 This is the actual data type stored in the bimap.
29 \code
30
31 template< class Tag, class Bimap >
32 struct data_type_by
33 {
34     typedef typename Bimap::{side}_data_type type;
35 };
36
37 \endcode
38
39 The following holds:
40
41 \code
42
43 BOOST_STATIC_ASSERT
44 (
45     is_same< data_type_by< member_at::left, bimap<A,B> >::type, A >::value
46 )
47
48 \endcode
49
50 See also member_at.
51 \ingroup bimap_group
52                                                                     **/
53
54 namespace boost {
55 namespace bimaps {
56 namespace support {
57
58 // Implementation of data type of metafunction
59
60 BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
61 (
62     data_type_by,
63     left_data_type,
64     right_data_type
65 )
66
67 } // namespace support
68 } // namespace bimaps
69 } // namespace boost
70
71
72 #endif // BOOST_BIMAP_SUPPORT_DATA_TYPE_BY_HPP
73