[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 Jonathan Wakely changed: What|Removed |Added Keywords||rejects-valid Stat

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #8 from Jonathan Wakely 2012-10-29 21:56:25 UTC --- Author: redi Date: Mon Oct 29 21:56:12 2012 New Revision: 192965 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192965 Log: PR libstdc++/55123 * i

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #7 from Jonathan Wakely 2012-10-29 21:49:31 UTC --- Author: redi Date: Mon Oct 29 21:49:19 2012 New Revision: 192964 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192964 Log: PR libstdc++/55123 * include/b

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #6 from Jonathan Wakely 2012-10-29 20:32:41 UTC --- I've previously considered removing the address(const_reference) overload when is_same, but doing so would not help most code (e.g. std::vector) work with user-defined allocat

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #5 from Marc Glisse 2012-10-29 19:50:59 UTC --- The standard doesn't say anything about it, but it would also be possible to tweak one of the address overloads in allocator so there is no ambiguity when both types are the same.

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread yegor.derevenets at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #4 from Yegor Derevenets 2012-10-29 18:35:45 UTC --- Confirm, the patch works for me.

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #3 from Jonathan Wakely 2012-10-29 18:23:58 UTC --- Actually the fix is trivial, we never need allocator<_Tp> , so can just ensure we never instantiate allocator<_Tp>, then it doesn't matter if _Tp is const. --- bits/shared

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug libstdc++/55123] [C++11] Construction of shared_ptr from unique_ptr fails

2012-10-29 Thread yegor.derevenets at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #1 from Yegor Derevenets 2012-10-29 17:09:49 UTC --- Created attachment 28561 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28561 Preprocessed test.cpp