STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
limited_allocator must grant friendship in order to be rebindable. Found by
MSVC, which rebinds allocators in more situations than libc++ does.
This raises an interesting question as to whether libc++ should be validating
user-defined allocators more aggressively.
https://reviews.llvm.org/D25451
Files:
test/support/test_allocator.h
Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -334,6 +334,9 @@
{
typedef limited_alloc_handle BuffT;
std::shared_ptr handle_;
+
+template friend class limited_allocator;
+
public:
typedef T value_type;
typedef value_type* pointer;
Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -334,6 +334,9 @@
{
typedef limited_alloc_handle BuffT;
std::shared_ptr handle_;
+
+template friend class limited_allocator;
+
public:
typedef T value_type;
typedef value_type* pointer;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits