Jonathan M Davis wrote:
On Saturday, April 14, 2012 20:47:20 Piotr Szturmaj wrote:
struct CommonInputRange(E)
{
@property bool delegate() empty;
@property E delegate() front;
void delegate() popFront;
}
front returns an element in the range. In your case, it's returning a
de
Artur Skawina wrote:
On 04/15/12 03:01, Piotr Szturmaj wrote:
Artur Skawina wrote:
@property is for functions masquerading as data, i'm not sure extending it
to pointers and delegates would be a good idea. What you are asking for is
basically syntax sugar for:
struct CommonInputRange(E)
On 04/15/12 03:01, Piotr Szturmaj wrote:
> Artur Skawina wrote:
>> @property is for functions masquerading as data, i'm not sure extending it
>> to pointers and delegates would be a good idea. What you are asking for is
>> basically syntax sugar for:
>>
>> struct CommonInputRange(E)
>> {
>>
On Saturday, April 14, 2012 20:47:20 Piotr Szturmaj wrote:
> I have following code:
>
> import std.array, std.range, std.stdio;
>
> struct CommonInputRange(E)
> {
> @property bool delegate() empty;
> @property E delegate() front;
> void delegate() popFront;
> }
>
> void main(strin
Artur Skawina wrote:
@property is for functions masquerading as data, i'm not sure extending it
to pointers and delegates would be a good idea. What you are asking for is
basically syntax sugar for:
struct CommonInputRange(E)
{
bool delegate() _empty;
@property auto empty
On 04/14/12 20:47, Piotr Szturmaj wrote:
> I have following code:
>
> import std.array, std.range, std.stdio;
>
> struct CommonInputRange(E)
> {
> @property bool delegate() empty;
> @property E delegate() front;
> void delegate() popFront;
> }
>
> void main(string[] args)
> {
> a
I have following code:
import std.array, std.range, std.stdio;
struct CommonInputRange(E)
{
@property bool delegate() empty;
@property E delegate() front;
void delegate() popFront;
}
void main(string[] args)
{
alias CommonInputRange!dchar DCRange;
static assert(isInputRange!