C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Ignoring attributes (was: Floating an idea: [[no_address]] for functions)

From: Jonathan Wakely <cxx_at_[hidden]>
Date: Mon, 24 Mar 2025 16:10:05 +0000
On Mon, 24 Mar 2025 at 16:08, Marcin Jaczewski via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> pon., 24 mar 2025 o 16:56 Matheus Izvekov via Std-Proposals
> <std-proposals_at_[hidden]> napisaƂ(a):
> >
> > I don't disagree in principle with the idea of allowing more kinds of
> > attributes, which currently ignorability rules out.
> >
> > But I think the status quo with vendor attributes is not very safe.
> > Either they should be mandatory to implement, or the compiler should
> > make it ill-formed
> > to use an attribute it doesn't know about, which seems would be quite
> > a breaking change.
> >
>
> This is why I would like to have explicit "required" attributes that
> if older compilers try to parse them fail with invalid syntax exceptions.


I was already thinking that [[explicit attr]] could be used instead of your
[!!attr]] but it could also be [[requires attr]] (or even [[explicit
requires attr]] ... but no).

Received on 2025-03-24 16:10:21