C++ Logo

std-proposals

Advanced search

Re: New attribute to change the default specifiers and qualifiers

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Tue, 19 Jan 2021 21:44:22 +0200
On Tue, 19 Jan 2021 at 21:28, Bo Persson via Std-Proposals
<std-proposals_at_[hidden]> wrote:
> The committee seems to not want attributes to change the meaning of
> programs. If a compiler ignores [[noreturn]] or [[nodiscard]] or
> [[gnu::special]], the program still works the same (although perhaps
> using less optimal code).
>
> Here [[strict]] really affects the meaning!
>
> Also, if I want all the specifiers - except final - how do I do that? :-)

Well. We're talking about applying a transformation to code. So the
way you do that is that
you program that transformation, and invoke it from your code.

In other words, via
http://open-std.org/JTC1/SC22/WG21/docs/papers/2020/p2237r0.pdf

Received on 2021-01-19 13:44:36