Subject: Re: Does [expr.call]/1 correctly authorize the snippet below to compile?
From: Krystian Stasiowski (sdkrystian_at_[hidden])
Date: 2019-10-14 14:41:40
It doesn't, that's why it's implied.
-------- Original message --------From: "J.A. Belloc via Std-Discussion" <std-discussion_at_[hidden]> Date: 10/14/19 15:36 (GMT-05:00) To: std-discussion_at_[hidden] Cc: "J.A. Belloc" <jabelloc_at_[hidden]> Subject: Re: [std-discussion] Does [expr.call]/1 correctly authorize the snippet below to compile? @Krystian StasiowskiIt took me some time to convinceÂ myself that the prvalue corresponding to the return of the function g()Â containing the address of fÂ is used directly by the compiler to call f(1). That is, there is no need for the materialization of such prvalue, into an xvalue, before the call to f, as I was thinking before this discussion. Thanks for the input.But regarding your observation "This is just another case where prvalue is implied, like with the operands of almost every other operator.", where in the standard does it say so?On Thu, Oct 10, 2019 at 12:12 PM Krystian Stasiowski via Std-Discussion <std-discussion_at_[hidden]> wrote:Sure, because when a glvalue appears in a context that requires a prvalue, the lvalue-to-rvalue, array-to-pointer or function-to-pointer conversions are performed.--
Std-Discussion mailing list
STD-DISCUSSION list run by email@example.com
Older Archives on Google Groups