flat_set.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef BOOST_CONTAINER_PMR_SET_HPP
  11. #define BOOST_CONTAINER_PMR_SET_HPP
  12. #if defined (_MSC_VER)
  13. # pragma once
  14. #endif
  15. #include <boost/container/flat_set.hpp>
  16. #include <boost/container/pmr/polymorphic_allocator.hpp>
  17. namespace boost {
  18. namespace container {
  19. namespace pmr {
  20. #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
  21. template <class Key
  22. ,class Compare = std::less<Key> >
  23. using flat_set = boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> >;
  24. template <class Key
  25. ,class Compare = std::less<Key> >
  26. using flat_multiset = boost::container::flat_multiset<Key, Compare, polymorphic_allocator<Key> >;
  27. #endif
  28. //! A portable metafunction to obtain a flat_set
  29. //! that uses a polymorphic allocator
  30. template <class Key
  31. ,class Compare = std::less<Key> >
  32. struct flat_set_of
  33. {
  34. typedef boost::container::flat_set<Key, Compare, polymorphic_allocator<Key> > type;
  35. };
  36. //! A portable metafunction to obtain a flat_multiset
  37. //! that uses a polymorphic allocator
  38. template <class Key
  39. ,class Compare = std::less<Key> >
  40. struct flat_multiset_of
  41. {
  42. typedef boost::container::flat_multiset<Key, Compare, polymorphic_allocator<Key> > type;
  43. };
  44. } //namespace pmr {
  45. } //namespace container {
  46. } //namespace boost {
  47. #endif //BOOST_CONTAINER_PMR_SET_HPP