This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/33930] [c++0x] ambiguous overload in std::stack::push() when using --std=cxx0x
- From: "a dot chavasse at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2007 23:51:52 -0000
- Subject: [Bug libstdc++/33930] [c++0x] ambiguous overload in std::stack::push() when using --std=cxx0x
- References: <bug-33930-14817@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from a dot chavasse at gmail dot com 2007-10-30 23:51 -------
Well, I did notice that the library was conforming to n2369, but I have really
no idea otherwise about this - except that it did break the compilation of some
really straightforward and innocent looking code of mine that was pushing const
pointers to objects on a stack so it did feel like something was wrong.
Perhaps an explicit cast to a const pointer is supposed to be necessary to
remove the ambiguity, but it feels counter-intuitive since it's my
understanding that the usage of rvalue references (and move semantics) instead
of lvalue references is meant to be a transparent optimization in most cases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33930