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++/77528] std::queue default constructor unnecessarily creates temporary of underlying Container


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77528

--- Comment #8 from jerryct <jerry.c.t at web dot de> ---
(In reply to Jonathan Wakely from comment #5)
> That introduces a different problem though. This won't compile with libc++:
> 
> #include <stack>
> struct D : std::deque<int> { D(int) { } };
> template class std::stack<int, D>;
> 
> That compiles fine with libstdc++ and we want to preserve that property.

Hi,

ok. But nevertheless I tried your patch and it works. The important point was
to remove the temporary.

jerry

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