• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_SET_HPP
12 #define BOOST_CONTAINER_PMR_FLAT_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 
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 Compare = std::less<Key> >
29 using flat_set = boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> >;
30 
31 template <class Key
32          ,class Compare = std::less<Key> >
33 using 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
39 template <class Key
40          ,class Compare = std::less<Key> >
41 struct 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
48 template <class Key
49          ,class Compare = std::less<Key> >
50 struct 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_FLAT_SET_HPP
60