What is the current stage of @property ?

Paul Backus snarwin at gmail.com
Wed Jun 10 23:28:44 UTC 2020


On Wednesday, 10 June 2020 at 23:26:35 UTC, Paul Backus wrote:
> 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));

My bad, missed the one-argument overload. That one does require 
@property.


More information about the Digitalmars-d-learn mailing list