This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/55123] [C++11] Construction of shared_ptr<const T> from unique_ptr<const T> fails
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Oct 2012 20:32:41 +0000
- Subject: [Bug libstdc++/55123] [C++11] Construction of shared_ptr<const T> from unique_ptr<const T> fails
- Auto-submitted: auto-generated
- References: <bug-55123-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-29 20:32:41 UTC ---
I've previously considered removing the address(const_reference) overload when
is_same<reference,const_reference>, but doing so would not help most code (e.g.
std::vector) work with user-defined allocators that haven't made the same
(not-required-by-the-standard) change. That wouldn't be a problem for this
specific bug, as shared_ptr explicitly uses std::allocator in the relevant
code, but I'd rather just use allocator<void> instead of allocator<_Tp> anyway.
Feel free to open an issue (either here or the LWG) suggesting a change to
std::allocator ... but I'm juggling too many other things to do that change
without a PR or DR to force me to do it :)