C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Don't get rid of <stdbool.h>

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Fri, 27 Nov 2026 12:58:31 +0000
On Wed, 25 Nov 2026 at 09:12, David Brown via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On 24/11/2026 20:44, Andrey Semashev via Std-Proposals wrote:
> > To be fair, at least some C++ compiler vendors are rather eager to
> > remove deprecated features. For example, std::auto_ptr, std::iterator
> > are effectively gone.
> >
>
> Deprecated features cannot be removed from compliant toolchains
> (compilers and/or standard libraries, whichever is relevant). A
> deprecated feature is still a feature of the language. The toolchain
>

std::auto_ptr and std::iterator aren't deprecated though, they're not part
of the C++ standard, and haven't been for years.


> can generate warnings on their usage, but they still need to be there.
> Only once the feature is removed from the standard (typically a
> standards version or two after deprecation) can they be removed from the
> toolchain. And even there, toolchains generally do keep them. Try to
> use std::auto_ptr with gcc and you'll find it is still there, and still
> works, but generates a "deprecated" warning unless you specifically
> choose "-std=c++98" - then no working is generated. (std::iterator is
> handled similarly.) Individual toolchains may vary, of course.
>
> The only features that are typically removed from toolchains are those
> that are /removed/ from the standards, not /deprecated/, and which are
>

Like std::auto_ptr and std::iterator.


> very rarely seen in real code. An example of that would be the "garbage
> collector support" parts of <memory>, such as std::declare_reachable.
> Even there, toolchains support them for older standards - they are not
> removed from the libraries.
>
>

Received on 2026-11-27 12:58:50