Date: Thu, 11 Jul 2024 14:15:51 -0700
On Thursday 11 July 2024 13:33:54 GMT-7 Tiago Freire wrote:
> I agree with having a gadget to be able to tell you "when it cannot do it".
> But that's a different thing from having a gadget that tells it that "it
> must do it" or "to what to do it too". Warning that it didn't do it when
> you expect it too. Is a different thing from adding a rule as to when it
> must do it. The doing it part should require no annotation. You can have an
> annotation to tell you if it did.
Agreed, I don't think we need to change the rules of when it can do it. There
may be some future need to allow NRVO where today it isn't possible, but I
can't think of one right now. Therefore, all cases where it can implement NRVO
are already implemented.
We need the syntax to enforce it.
But we also need to have the rules written down, so code can depend on it, if
we want to have a standard attribute. Either that or we make the rule
implementation-defined behaviour that must be documented and we get the ABI-
compatible implementations to agree on them.
> I agree with having a gadget to be able to tell you "when it cannot do it".
> But that's a different thing from having a gadget that tells it that "it
> must do it" or "to what to do it too". Warning that it didn't do it when
> you expect it too. Is a different thing from adding a rule as to when it
> must do it. The doing it part should require no annotation. You can have an
> annotation to tell you if it did.
Agreed, I don't think we need to change the rules of when it can do it. There
may be some future need to allow NRVO where today it isn't possible, but I
can't think of one right now. Therefore, all cases where it can implement NRVO
are already implemented.
We need the syntax to enforce it.
But we also need to have the rules written down, so code can depend on it, if
we want to have a standard attribute. Either that or we make the rule
implementation-defined behaviour that must be documented and we get the ABI-
compatible implementations to agree on them.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2024-07-11 21:15:54