[libcxx] [test] Fix test bugs in string.cons/copy_alloc.pass.cpp.
authorBilly Robert O'Neal III <bion@microsoft.com>
Wed, 3 Apr 2019 00:05:49 +0000 (00:05 +0000)
committerBilly Robert O'Neal III <bion@microsoft.com>
Wed, 3 Apr 2019 00:05:49 +0000 (00:05 +0000)
commit7b9e4ebb033e706935a8b497256726f0f0d66f99
tree3901e181534b20422982b9dbc29545dc075d0a37
parent16683a3ef81a598a249b89c4ef7aa283f4979d83
[libcxx] [test] Fix test bugs in string.cons/copy_alloc.pass.cpp.

Fixed the inability to properly rebind the testing allocator, by making the
inner alloc_impl type a plain struct and making the operations templates. Before
rebind failed to compile complaining that a alloc_impl<T>* was not convertible
to an alloc_impl<U>*.

This enables the test to pass for MSVC++ once we provide the strong guarantee
for the copy assignment operator.

Reviewed as https://reviews.llvm.org/D60023

llvm-svn: 357545
libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp