https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82685
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2017-10-24 Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org Target Milestone|--- |7.3 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Pavel I. Kryukov from comment #0) > `string_view` literal operators should have 'noexcept' specifier according > to the C++17 standard: > https://github.com/cplusplus/draft/blob/ > 4ba4e9c2c04b7680ac2a56b65c241ec10c427c3f/source/strings.tex#L4611 Oops, I think we probably copied the code from the std::string literals, which can throw. > Currently GCC implements the literal operators via > `basic_string_view<_charT>(const _charT*, size_t)` ctor which may throw an > exception according to the same standard. > https://github.com/gcc-mirror/gcc/blob/ > 0f6374027d3cd77f80f353eb1c2c61c5ad2b6dfd/libstdc%2B%2B-v3/include/std/ > string_view#L638 That's irrelevant, it doesn't throw when given correct arguments, and never throws in our implementation.