[PATCH] D25451: [libcxx] [test] limited_allocator should be limited_allocator's best friend forever
Stephan T. Lavavej via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 13:49:41 PDT 2016
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<N> BuffT;
std::shared_ptr<BuffT> handle_;
+
+ template <class U, std::size_t X> friend class limited_allocator;
+
public:
typedef T value_type;
typedef value_type* pointer;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25451.74170.patch
Type: text/x-patch
Size: 444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161010/77915da6/attachment.bin>
More information about the cfe-commits
mailing list