Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
#include "../min_allocator.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
@@ -22,5 +24,13 @@ int main()
|
||||
s = {'a', 'b', 'c'};
|
||||
assert(s == "abc");
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
{
|
||||
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> S;
|
||||
S s;
|
||||
s = {'a', 'b', 'c'};
|
||||
assert(s == "abc");
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
|
||||
}
|
||||
|
Reference in New Issue
Block a user