Hi,
On 20/05/2016 17:24, Jason Merrill wrote:
On 05/20/2016 07:17 AM, Paolo Carlini wrote:
The below passes testing. There are a few minor changes wrt your
suggestions (I think we want & as hint;
I disagree; if what the user wanted was a function pointer, there's no
reason to use decltype(auto) over plain auto. Much more likely that
they meant to capture the (possibly reference) result of a call.
... ok, if you are sure that the user (ok, novice programmer) will not
be puzzled when he will see that decltype (auto) a = foo () also does
not work... but I agree hints are hints, will never be 100% correct and
informative...
spacing consistent with
typeck2.c; DECL_NAME doesn't seem necessary). I wondered if we want to
tighten the condition consistently with the wording of the error
message, thus patchlet *2 below, which of course also passes testing.
No, I don't think there's any way to deduce function type without the
initializer having function type.
So, the first patch is OK with the message changed to ().
Ok.
Paolo.