On Fri, Aug 04, 2017 at 04:43:32PM -0600, Martin Sebor wrote: > On 07/31/2017 05:46 PM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders <tbsaunde+...@tbsaunde.org> > > > > Hi, > > > > I've been saying I'd do this for a long time, but I'm finally getting to > > importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while > > back. I believe the gtl namespace also comes from Pedro, but GNU template > > library seems as reasonable as any other name I can come up with. I'm not > > sure > > at the moment what outside of gcc may want to use this, but putting it > > include/ > > at least allows us to use it in libcpp which may be useful. I didn't > > include > > too much usage in this series, but I believe other people have wanted this > > too, > > so I'm reasonably confident it will get a fair amount of usage. > > > > patches individually bootstrapped + regtested on ppc64-linux-gnu, ok? > > FWIW, I'm a big fan of RAII and I like the idea being able to > rely on a smart pointer in GCC quite a bit. Although I haven't > reviewed the C++ 03 implementation in any detail I like how the > new API is just transitional until GCC switches from C++ 98 to > C++ 11 when it will be possible to drop it, presumably with no > changes to client code. (If there's any risk that clients might > come to depend on the C++ 03 "features" or limitations in the > meantime and thus jeopardize this goal I would only suggest to > put some effort into making this harder.)
Given that stage 2 / 3 of a bootstrap is as C++14 I expect that it would be pretty hard to put in code that works with the shim, but not real unique_ptr, since in a bootstrap situation both would be used. > Other than that, thank you for this nice enhancement! your welcome Trev > > Martin >