On Tue, 2022-07-12 at 17:40 +0100, Pedro Alves wrote: > On 2022-07-12 4:14 p.m., Jonathan Wakely wrote: > > > > So once GCC requires C++14, why would you want to preserve
I look forward to the happy day when we can use C++14 in GCC's implementation, but I don't see it happening anytime soon. GCC's needs may differ from those of GDB's. I'm not very familiar with GDB's insides, but, for example, GCC has its own garbage-collector which complicates everything to do with memory managements. Right now I have comments expressing ownership of some pointers, and e.g. "takes ownership of ...". It would be wonderful to take some baby steps into using C++11 to express the ownership directly in code. > > > once-backported symbols in a namespace other than std, when you > > > no longer have a reason to? > > > It will just be another unnecessary thing that newcomers at that > > > future time will have > > > to learn. > > > > I also don't see a problem with importing std::make_unique into > > namespace gcc for local use alongside other things in namespace > > gcc. I > > do consider that idiomatic. It says "the make_unique for gcc code > > is > > std::make_unique". It means you only need a 'using namespace gcc;' > > at > > the top of a source file and you get access to everything in > > namespace > > gcc, even if it is something like std::make_unique that was > > originally > > defined in a different namespace. Jonathan's idea sounds good to me. > > > > If that's the approach, then GCC should import std::unique_ptr, > std::move, > std::foo, std::bar into the gcc namespace too, no? Are you really > going > to propose that? Pedro, it feels to me like you're constructing a strawman here. Neither me nor Jonathan are proposing that. I just want to be able to comfortably use std::unique_ptr in GCC in the places for which it makes sense, and being able to use "make_unique" is a part of that. Hope this is constructive Dave