[Bug c++/92434] noexcept couldn't be deduced in function template

2020-01-30 Thread nok.raven at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434 --- Comment #5 from Nikita Kniazev --- > but does [temp.deduct] actually require that this works? Judging by CWG 2355 it does not.

[Bug c++/92434] noexcept couldn't be deduced in function template

2020-01-30 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434 --- Comment #4 from Marek Polacek --- That should probably be + if (spec && TREE_PURPOSE (spec) && deducible_expression (TREE_PURPOSE (spec))) Note that clang fails if noexcept(B) is changed to e.g. noexcept(!B).

[Bug c++/92434] noexcept couldn't be deduced in function template

2020-01-30 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434 --- Comment #3 from Marek Polacek --- To match clang we could use --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -21470,6 +21470,12 @@ uses_deducible_template_parms (tree type) for (; parm; parm = TREE_CHAIN (parm)) if (uses_deducible_templa

[Bug c++/92434] noexcept couldn't be deduced in function template

2020-01-30 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434 --- Comment #2 from Marek Polacek --- Extended testcase: template void foo_false(void(*)() noexcept(B)) { static_assert (!B); } template void foo_true(void(*)() noexcept(B)) { static_assert (B); } void f(); void fn() noexcept; void bar()

[Bug c++/92434] noexcept couldn't be deduced in function template

2020-01-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|