https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90493
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=96523
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to S. Davis Herring from comment #1)
> It's already wrong for
>
> template <typename T> const int foo = 42;
>
> to produce internal linkage; [basic.link]/5.2 excludes variable templates
> from the rule that const implies static. See also CWG1713.
That's PR 96523.
Reduced to show just the rejects-valid part:
template <typename T> extern const int foo = 41;
// this is an error:
// error: explicit template specialization cannot have a storage class
template <> extern const int foo<int> = 42;