Brian Silverman | fad8f55 | 2018-08-04 23:36:19 -0700 | [diff] [blame^] | 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_VECTOR_HPP |
| 12 | #define BOOST_CONTAINER_PMR_VECTOR_HPP |
| 13 | |
| 14 | #if defined (_MSC_VER) |
| 15 | # pragma once |
| 16 | #endif |
| 17 | |
| 18 | #include <boost/container/vector.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 T> |
| 28 | using vector = boost::container::vector<T, polymorphic_allocator<T>>; |
| 29 | |
| 30 | #endif |
| 31 | |
| 32 | //! A portable metafunction to obtain a vector |
| 33 | //! that uses a polymorphic allocator |
| 34 | template<class T> |
| 35 | struct vector_of |
| 36 | { |
| 37 | typedef boost::container::vector |
| 38 | < T, polymorphic_allocator<T> > type; |
| 39 | }; |
| 40 | |
| 41 | } //namespace pmr { |
| 42 | } //namespace container { |
| 43 | } //namespace boost { |
| 44 | |
| 45 | #endif //BOOST_CONTAINER_PMR_VECTOR_HPP |