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)
@@ -31,9 +33,20 @@ test(const S& s)
int main()
{
{
typedef std::string S;
test(S(""));
test(S("abcde"));
test(S("abcdefghij"));
test(S("abcdefghijklmnopqrst"));
}
#if __cplusplus >= 201103L
{
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
test(S(""));
test(S("abcde"));
test(S("abcdefghij"));
test(S("abcdefghijklmnopqrst"));
}
#endif
}