This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/77528] std::queue default constructor unnecessarily creates temporary of underlying Container
- From: "jerry.c.t at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jan 2017 19:02:04 +0000
- Subject: [Bug libstdc++/77528] std::queue default constructor unnecessarily creates temporary of underlying Container
- Auto-submitted: auto-generated
- References: <bug-77528-4@http.gcc.gnu.org/bugzilla/>
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