C++ Logo

std-proposals

Advanced search

Re: Template specializations in modules

From: Charles Milette <charlesmilette_at_[hidden]>
Date: Sat, 12 Jun 2021 01:18:20 -0400
It doesn't even declare a name, it reuses an existing name. It's the
same reason deduction guides can't be exported from a module: they do
not have a name.

Specializations also aren't found through name lookup, but this is
what module exportation is all about.

Sorry for the late reply

On Thu, Jun 3, 2021 at 1:25 AM Jason McKesson via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> 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.
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2021-06-12 00:18:32