https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61660

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Udo Steinberg from comment #0)
> In the attached test case, for each compile-time constant value x,

x is not a compile-time constant, it's a run-time parameter of the function.


> only one
> static_assert in the switch statement should be checked.

Why? All four are in the body of the function template and all four are
compiled for every instantiation, so all four are checked on every
instantiation

A 'switch' is a run-time condition.

> Looks like all four
> of them are checked every time.

That's exactly what's supposed to happen.

Reply via email to