C++ Logo


Advanced search

Re: [std-proposals] Relocation in C++

From: Bo Persson <bo_at_[hidden]>
Date: Mon, 19 Dec 2022 13:11:12 +0100
On 2022-12-19 at 12:32, S├ębastien Bini via Std-Proposals wrote:

> With the updated rules, if std::pair has the
> [[no_parameter_reloc(auto)]]attribute, then std::pair<MyString,int>
> opts-out, while std::pair<MyString,UserDefinedOptInType> opts-in.
> I am also thinking of allowing a function attribute to opt-out on
> function level for tricky cases.
> Anyone have some thoughts on the matter?

At least originally, there was a basic idea that ignoring an attribute
should not affect the validity of a program. Like [[nodiscard]] and
[[maybe_unused]] would affect warnings, but not the generated code.

Adding ABI-modifying attributes seems to be totally contrary to this.

Received on 2022-12-19 12:11:19