mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-30 15:31:18 +00:00
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:
1 parent
e852add40e
commit
eec721826c
151 files changed
+5125
-645
No files matched your search
@@ -14,6 +14,8 @@
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "../min_allocator.h"
|
||||
|
||||
template <class S>
|
||||
void
|
||||
test(const S& s)
|
||||
@@ -23,8 +25,18 @@ test(const S& s)
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
typedef std::string S;
|
||||
test(S());
|
||||
test(S("123"));
|
||||
test(S("12345678901234567890123456789012345678901234567890"));
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
test(S());
|
||||
test(S("123"));
|
||||
test(S("12345678901234567890123456789012345678901234567890"));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user