C++ Logo

std-proposals

Advanced search

Re: [std-proposals] [DRAFT PAPER] Allowing the establishment of namespace scopes in an export-declaration

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Mon, 12 Sep 2022 01:41:42 -0400
On Mon, Sep 12, 2022 at 12:00 AM Zopolis0 via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> > BTW AFAIK #pragma once (which you used in examples) is still not standardized
> Good point, I forgot about that. I've updated the draft.

Your "old.h/cpp" examples don't use namespaces at all. `old` is a
class, not a namespace.

Also, your new wording answers very few of the questions I posed. It's
the same terrible wording, but with "functions" changed to "names" and
a statement about where this grammar can go.

Just your example raises many questions. For example, what namespace
is `foo` in? How do you access them if they're not in the namespace?
If non-exported names aren't in that namespace, can you define two
entities, one exported and one not, with the same name and have that
just work because of the implicit namespace business?

And you never deal with the question of multiple translation units,
which is at present a complete non-starter.

Received on 2022-09-12 05:42:32