[Bug libstdc++/77528] std::queue default constructor unnecessarily creates temporary of underlying Container

jerry.c.t at web dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 10 19:02:00 GMT 2017


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


More information about the Gcc-bugs mailing list