Re: [std-proposals] Was there ever proposal/discussion of private namespace or private using?

96 views
Skip to first unread message

Thiago Macieira

unread,
Jun 14, 2019, 4:56:42 PM6/14/19
to std-pr...@isocpp.org
On Friday, 14 June 2019 13:50:34 PDT Ivan Matek via Std-Proposals wrote:
> private using namespace std; // applies to ONLY this file, files that
> include headery_mcheaderface.h will not get polluted, nice for making
> declarations shorter

There's no concept of file in C++. Remember that the preprocessor will run and
concatenate all content before the actual C++ compiler sees anything.

You may want to rethink your proposal in terms of Modules.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel System Software Products



Reply all
Reply to author
Forward
0 new messages