What is the current stage of @property ?
Paul Backus
snarwin at gmail.com
Wed Jun 10 23:26:35 UTC 2020
On Wednesday, 10 June 2020 at 23:03:21 UTC, Adam D. Ruppe wrote:
> On Wednesday, 10 June 2020 at 22:50:17 UTC, Paul Backus wrote:
>> static assert(isInputRange!S); // passes
>
> isInputRange doesn't check it but others do.
> std.random.isSeedable requires @property on front for example.
Nope:
struct S {
bool empty() { return false; }
int front() { return 0; }
void popFront() {}
enum bool isUniformRandom = true;
void seed(int s) {}
}
static assert(isSeedable!(S, int));
More information about the Digitalmars-d-learn
mailing list