Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.

llvm-svn: 185167
This commit is contained in:
Howard Hinnant
2013-06-28 16:59:19 +00:00
parent e852add40e
commit eec721826c
151 changed files with 5125 additions and 645 deletions

View File

@@ -14,6 +14,8 @@
#include <string>
#include <cassert>
#include "../min_allocator.h"
template <class S>
void
test(const S& s, typename S::size_type c)
@@ -23,8 +25,18 @@ test(const S& s, typename S::size_type c)
int main()
{
{
typedef std::string S;
test(S(), 0);
test(S("123"), 3);
test(S("12345678901234567890123456789012345678901234567890"), 50);
}
#if __cplusplus >= 201103L
{
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
test(S(), 0);
test(S("123"), 3);
test(S("12345678901234567890123456789012345678901234567890"), 50);
}
#endif
}