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.
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).
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
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()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92434
Martin Liška changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|