Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jiang Ma
Thanks for the kindly reply! > Why is mytest in the global namespace? I'm a C++ newbie, and still not used to put everything into a namespace. Sorry to bother... > We try to avoid extensions in gcc, you may want to propose this to the C++ > standard committee first. However, you should first

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jiang Ma
Agree! I will put my definitions into a namespace as you suggested. Jonathan Wakely 于2020年1月15日周三 下午11:42写道: > > On Wed, 15 Jan 2020 at 15:37, Jiang Ma wrote: > > > > Thanks for the kindly reply! > > > It would create a non-standard, non-portable dialect of C++. We prefer > > > to avoid adding

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jonathan Wakely
On Wed, 15 Jan 2020 at 15:37, Jiang Ma wrote: > > Thanks for the kindly reply! > > It would create a non-standard, non-portable dialect of C++. We prefer > > to avoid adding non-standard extensions these days. You could propose > >it to the C++ committee, but I'm pretty sure they would not want

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jiang Ma
Thanks for the kindly reply! > It would create a non-standard, non-portable dialect of C++. We prefer > to avoid adding non-standard extensions these days. You could propose >it to the C++ committee, but I'm pretty sure they would not want such >a thing. Indeed, pragma is not portable. I

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jonathan Wakely
On Wed, 15 Jan 2020 at 08:15, 马江 wrote: > > Hello, > After some google, I find there is no way to control the scope of > "using" for the moment. This seems strange as we definitely need this > feature especially when writing inline member functions in c++ > headers. > > Currently I am

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Marc Glisse
On Wed, 15 Jan 2020, 马江 wrote: Hello, After some google, I find there is no way to control the scope of "using" for the moment. This seems strange as we definitely need this feature especially when writing inline member functions in c++ headers. Currently I am trying to build a simple

Re: [RFC] add push/pop pragma to control the scope of "using"

2020-01-15 Thread Jeffrey Walton
On Wed, Jan 15, 2020 at 3:15 AM 马江 wrote: > > Hello, > After some google, I find there is no way to control the scope of > "using" for the moment. This seems strange as we definitely need this > feature especially when writing inline member functions in c++ > headers. > > Currently I am