blob: f072c951391639656a8abcbb8977719c20edb16e [file] [log] [blame]
Brian Silvermanfad8f552018-08-04 23:36:19 -07001//////////////////////////////////////////////////////////////////////////////
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_SET_HPP
12#define BOOST_CONTAINER_PMR_SET_HPP
13
14#if defined (_MSC_VER)
15# pragma once
16#endif
17
18#include <boost/container/flat_set.hpp>
19#include <boost/container/pmr/polymorphic_allocator.hpp>
20
21namespace boost {
22namespace container {
23namespace pmr {
24
25#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
26
27template <class Key
28 ,class Compare = std::less<Key> >
29using flat_set = boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> >;
30
31template <class Key
32 ,class Compare = std::less<Key> >
33using flat_multiset = boost::container::flat_multiset<Key, Compare, polymorphic_allocator<Key> >;
34
35#endif
36
37//! A portable metafunction to obtain a flat_set
38//! that uses a polymorphic allocator
39template <class Key
40 ,class Compare = std::less<Key> >
41struct flat_set_of
42{
43 typedef boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> > type;
44};
45
46//! A portable metafunction to obtain a flat_multiset
47//! that uses a polymorphic allocator
48template <class Key
49 ,class Compare = std::less<Key> >
50struct flat_multiset_of
51{
52 typedef boost::container::flat_multiset<Key, Compare, polymorphic_allocator<Key> > type;
53};
54
55} //namespace pmr {
56} //namespace container {
57} //namespace boost {
58
59#endif //BOOST_CONTAINER_PMR_SET_HPP