This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/33930] [c++0x] ambiguous overload in std::stack::push() when using --std=cxx0x



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]