https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
Giuseppe D'Angelo changed:
What|Removed |Added
CC||dangelog at gmail dot com
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
--- Comment #6 from Jonathan Wakely ---
That's a different bug, so thanks for filing it separately (PR 94590).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
--- Comment #2 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #1)
> The behaviour is by design
And documented, see
https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wnarrowing
"For C++11 and later sta
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
Marc Mutz changed:
What|Removed |Added
Resolution|INVALID |DUPLICATE
--- Comment #4 from Marc Mutz ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92856
--- Comment #3 from Marc Mutz ---
Indeed, I didn't check that it actually fails in SFINAE. Sorry for that.
This works:
// https://godbolt.org/z/EfJmS4
#include
#include
template
using nonnarrowing_test = decltype(To{std::declval()