[PATCH] D25451: [libcxx] [test] limited_allocator should be limited_allocator's best friend forever

2016-10-13 Thread Eric Fiselier via cfe-commits
EricWF closed this revision.
EricWF added a comment.

I committed this fix a couple days ago when helping the libstdc++ maintainers 
setup our test suite.


https://reviews.llvm.org/D25451



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25451: [libcxx] [test] limited_allocator should be limited_allocator's best friend forever

2016-10-10 Thread Stephan T. Lavavej via cfe-commits
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