[Issue 23620] 'alias this' is not respected in static array length position
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 16 11:15:26 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23620
--- Comment #8 from Salih Dincer <salihdb at hotmail.com> ---
I don't understand too :)
This code works me:
struct Index(T)
{
T value;
this(T v) { value = v; };
alias opCall this;
@property opCall() inout {
return value;
}
}
enum one= Index!int(1)();
int[one] a = 1;
int[Index!int(2)()] b = 2;
static assert(a.length < b.length);
Best regards...
SDB at 79
--
More information about the Digitalmars-d-bugs
mailing list