small_vector.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_SMALL_VECTOR_HPP
  11. #define BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP
  12. #if defined (_MSC_VER)
  13. # pragma once
  14. #endif
  15. #include <boost/container/small_vector.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 T, std::size_t N>
  22. using small_vector = boost::container::small_vector<T, N, polymorphic_allocator<T>>;
  23. #endif
  24. //! A portable metafunction to obtain a small_vector
  25. //! that uses a polymorphic allocator
  26. template<class T, std::size_t N>
  27. struct small_vector_of
  28. {
  29. typedef boost::container::small_vector
  30. < T, N, polymorphic_allocator<T> > type;
  31. };
  32. } //namespace pmr {
  33. } //namespace container {
  34. } //namespace boost {
  35. #endif //BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP