Thread overview | |||||
---|---|---|---|---|---|
|
April 18, 2013 foo is not an lvalue | ||||
---|---|---|---|---|
| ||||
void main() { foo!(); } template foo( ) { void foo() { auto a = (&foo); } } dmd from master (a few days ago) gives: Error: foo()() is not an lvalue wut? |
April 18, 2013 Re: foo is not an lvalue | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ellery Newcomer | Ellery Newcomer:
> dmd from master (a few days ago) gives:
>
> Error: foo()() is not an lvalue
>
>
> wut?
I think you need to write:
auto a = &foo!();
Bye,
bearophile
|
April 18, 2013 Re: foo is not an lvalue | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On 04/17/2013 06:02 PM, bearophile wrote:
> Ellery Newcomer:
>
>> dmd from master (a few days ago) gives:
>>
>> Error: foo()() is not an lvalue
>>
>>
>> wut?
>
> I think you need to write:
>
> auto a = &foo!();
>
> Bye,
> bearophile
wouldn't that be infinitely recursing template instantiation?
|
Copyright © 1999-2021 by the D Language Foundation