[Bug c++/103297] GCC cannot detect out of bounds in constexpr context.

2021-11-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103297 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIR

[Bug c++/103297] GCC cannot detect out of bounds in constexpr context.

2021-11-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103297 --- Comment #3 from Jonathan Wakely --- (In reply to cqwrteur from comment #0) > out_of_bounds_detector(buffer,buffer+7);//should give a hard error This looks like PR 70151 (In reply to cqwrteur from comment #1) > std::string_view

[Bug c++/103297] GCC cannot detect out of bounds in constexpr context.

2021-11-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103297 Jonathan Wakely changed: What|Removed |Added Keywords||accepts-invalid --- Comment #2 from J

[Bug c++/103297] GCC cannot detect out of bounds in constexpr context.

2021-11-17 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103297 --- Comment #1 from cqwrteur --- Another issue #include #include #include inline constexpr std::string_view lifetime_detector(std::string const& str) noexcept { return str; } inline constexpr bool test2(std::string_view vw2) noexcept