]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
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_STRING_HPP | |
12 | #define BOOST_CONTAINER_PMR_STRING_HPP | |
13 | ||
14 | #if defined (_MSC_VER) | |
15 | # pragma once | |
16 | #endif | |
17 | ||
18 | #include <boost/container/string.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 CharT, class Traits = std::char_traits<CharT> > | |
28 | using basic_string = | |
29 | boost::container::basic_string<CharT, Traits, polymorphic_allocator<CharT> >; | |
30 | ||
31 | #endif | |
32 | ||
33 | //! A portable metafunction to obtain a basic_string | |
34 | //! that uses a polymorphic allocator | |
35 | template <class CharT, class Traits = std::char_traits<CharT> > | |
36 | struct basic_string_of | |
37 | { | |
38 | typedef boost::container::basic_string | |
39 | <CharT, Traits, polymorphic_allocator<CharT> > type; | |
40 | }; | |
41 | ||
42 | typedef basic_string_of<char>::type string; | |
43 | ||
44 | typedef basic_string_of<wchar_t>::type wstring; | |
45 | ||
46 | } //namespace pmr { | |
47 | } //namespace container { | |
48 | } //namespace boost { | |
49 | ||
50 | #endif //BOOST_CONTAINER_PMR_STRING_HPP |