On 02/01/16 21:42, Artur Skawina wrote:
> On 02/01/16 20:47, Meta via Digitalmars-d-learn wrote:
>> That looks much nicer. It still needs work to properly handle functions with
>> non-empty argument lists.
>
> Then it gets a bit long for a one-liner ;)
>
> enum isLvalue(A...) = is(typeof((ref _){}(A[0](A[1..$])))) ||
> is(typeof((ref _){}(A[0])));
And it's of course wrong in case there is a zero-args ref-returning
overload present. So...
enum isLvalue(A...) = A.length>1?is(typeof((ref
_){}(A[0](A[1..$])))):is(typeof((ref _){}(A[0])));
artur