http://llvm.org/bugs/show_bug.cgi?id=20616

            Bug ID: 20616
           Summary: shared_ptr does not compile with fancy pointer
                    allocators
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

The implementation of allocate_shared currently assumes that
allocator_traits<_Alloc>::pointer is a native pointer, and thus doesn't compile
with fancy pointers.

I believe all that's needed is to replace "__hold2.get()" by
"_VSTD::addressof(*__hold2.get())" in a few places (e.g. memory:4289 and
memory:4292, maybe also for the _LIBCPP_HAS_NO_VARIADICS versions.

A few quick tests suggest that with those fixes you can use allocate_shared and
also the allocator constructor with fancy pointer allocators.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to