Boost logo

Boost :

Subject: Re: [boost] Is there any interest in non-owning pointer-like types?
From: Joseph Thomson (joseph.thomson_at_[hidden])
Date: 2017-02-03 03:25:07


I agree we need this vocabulary type. GSL guidelines are for code that will
be written from scratch with C++14/C++17.
The reality is that we have tons of C++98 code. Pretending that T* is a not
owning pointer because we have gsl::owner is not useful in a legacy code
project. I'm not saying that gsl::owner is not useful.

Sorry, one additional comment. AFAIK, the GSL is aimed at those writing new
C++ code, those updating old C++ code, and those making low-level C++ code
safer. For example, `owner` is for use where something like `unique_ptr`
cannot be used (either legacy code, or perhaps the library implementation
of `unique_ptr` itself!)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk