This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 06 Sep 2013 17:33:19 +0000
- Subject: [Bug libstdc++/58338] New: Add noexcept to functions with a narrow contract
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58338
Bug ID: 58338
Summary: Add noexcept to functions with a narrow contract
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: glisse at gcc dot gnu.org
Hello,
the standard only requires a noexcept specifier on functions with a wide
contract, to allow some debug implementations of functions with a narrow
contract. However, it also explicitly gives permission to strengthen the
exception specification of non-virtual functions. I believe libstdc++ should
add noexcept whereever it can, since this is supposed to help with performance.
Functions like vector::front seem like good candidates. I wouldn't mind if the
debug version had a different exception specification, but that doesn't even
seem necessary since libstdc++ aborts instead of throwing.
https://groups.google.com/a/isocpp.org/d/msg/std-discussion/lkRyImxouC0/kZpWqI0MjXsJ