C++ Logo


Advanced search

Re: Was there ever proposal/discussion of private namespace or private using?

From: Jake Arkinstall <jake.arkinstall_at_[hidden]>
Date: Fri, 14 Jun 2019 23:53:35 +0100
On Fri, 14 Jun 2019, 22:21 Matthew Woehlke via Std-Proposals, <
std-proposals_at_[hidden]> wrote:

> Basically, I don't see any non-modules way for the compiler
> to "forget" things at include boundaries, and *with* modules, well,
> things already work the way you want. This was, in fact, one of the
> primary motivations for modules.

There is one option: Statements that reverse the behaviour of "using". I
mean, we already have to manually use statements to prevent multiple
processing of header files (include guards) as far as the standard is
concerned, so being able to undo a using statement at the end of a file
might be one easier short term option.

Its a bit gross and hacky, but it just might work, especially on existing
projects where modules may be too big a leap for the short term.

Received on 2019-06-14 17:55:34