C++ Logo


Advanced search

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

From: Thiago Macieira <thiago_at_[hidden]>
Date: Wed, 21 Dec 2022 09:08:38 -0300
On Tuesday, 20 December 2022 10:25:48 -03 Timur Doumler via Std-Proposals
> [[assume]] can also modify ABI in one particular edge case
> (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2552r1.pdf, see
> last code example on page 5).

That's a defect in the design of the attribute. Since attributes are
ignorable, they shouldn't cause captures that wouldn't otherwise be captured.
This should be an error and can still be fixed to be an error, as the paper
says " In real code, it is not useful to use a variable only in an assumption,
but not anywhere else in the surrounding code".

I think everyone who's looked into it agrees NUA should not be an attribute.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2022-12-21 12:08:41