C++ Logo


Advanced search

Re: Template specializations in modules

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Thu, 3 Jun 2021 01:24:54 -0400
On Wed, Jun 2, 2021 at 11:46 PM Charles Milette via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> From [module.interface]
> > An exported declaration that is not a module-import-declaration
> > shall declare at least one name.
> And specializations do not introduce a new name.

But it doesn't say "shall declare at least one *new* name"; it just
says "one name". Now, there is the rule that you can't redeclare
something as `export`ed if it was not originally declared `export`ed.
But an explicit specialization is not a redeclaration.

So as far as I can tell, an explicit specialization is a declaration,
and it declares a name. Therefore, it can be exported.

Received on 2021-06-03 00:25:12