Subject: Re: Does [expr.call]/1 correctly authorize the snippet below to compile?
From: Jason Cobb (jason.e.cobb_at_[hidden])
Date: 2019-10-10 09:49:39
On 10/10/19 10:25 AM, Krystian Stasiowski via Std-Discussion wrote:
> Here is how I parse it:
> For a call to a non-member function or to a static member
> function, the postfix expression shall either be:
> - an
> Â lvalue that refers to a function (in which case the
> function-to-pointer standard conversionÂ is suppressed on the
> postfix expression), or
> - [a prvalue and] have function pointer type.
I read it as just needing function pointer type. All of the big 4
compilers agree that it need not be a prvalue; for instance, it could be
an xvalue: https://godbolt.org/z/Il8sH3 .
-- Jason Cobb
STD-DISCUSSION list run by herb.sutter at gmail.com
Older Archives on Google Groups