]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | ////////////////////////////////////////////////////////////////////////////// |
2 | // | |
3 | // (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost | |
4 | // Software License, Version 1.0. (See accompanying file | |
5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | // | |
7 | // See http://www.boost.org/libs/container for documentation. | |
8 | // | |
9 | ////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef BOOST_CONTAINER_PMR_FLAT_MAP_HPP | |
12 | #define BOOST_CONTAINER_PMR_FLAT_MAP_HPP | |
13 | ||
14 | #if defined (_MSC_VER) | |
15 | # pragma once | |
16 | #endif | |
17 | ||
18 | #include <boost/container/flat_map.hpp> | |
19 | #include <boost/container/pmr/polymorphic_allocator.hpp> | |
20 | ||
21 | namespace boost { | |
22 | namespace container { | |
23 | namespace pmr { | |
24 | ||
25 | #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) | |
26 | ||
27 | template <class Key | |
28 | ,class T | |
29 | ,class Compare = std::less<Key> | |
30 | ,class Options = tree_assoc_defaults > | |
31 | using flat_map = boost::container::flat_map<Key, T, Compare, polymorphic_allocator<std::pair<Key, T> > >; | |
32 | ||
33 | template <class Key | |
34 | ,class T | |
35 | ,class Compare = std::less<Key> | |
36 | ,class Options = tree_assoc_defaults > | |
37 | using flat_multimap = boost::container::flat_multimap<Key, T, Compare, polymorphic_allocator<std::pair<Key, T> > >; | |
38 | ||
39 | #endif | |
40 | ||
41 | //! A portable metafunction to obtain a flat_map | |
42 | //! that uses a polymorphic allocator | |
43 | template <class Key | |
44 | ,class T | |
45 | ,class Compare = std::less<Key> | |
46 | ,class Options = tree_assoc_defaults > | |
47 | struct flat_map_of | |
48 | { | |
49 | typedef boost::container::flat_map<Key, T, Compare, polymorphic_allocator<std::pair<Key, T> > > type; | |
50 | }; | |
51 | ||
52 | //! A portable metafunction to obtain a flat_multimap | |
53 | //! that uses a polymorphic allocator | |
54 | template <class Key | |
55 | ,class T | |
56 | ,class Compare = std::less<Key> | |
57 | ,class Options = tree_assoc_defaults > | |
58 | struct flat_multimap_of | |
59 | { | |
60 | typedef boost::container::flat_multimap<Key, T, Compare, polymorphic_allocator<std::pair<Key, T> > > type; | |
61 | }; | |
62 | ||
63 | } //namespace pmr { | |
64 | } //namespace container { | |
65 | } //namespace boost { | |
66 | ||
67 | #endif //BOOST_CONTAINER_PMR_FLAT_MAP_HPP |