On Tuesday, 10 March 2015 at 10:36:21 UTC, ketmar wrote:
On Tue, 10 Mar 2015 10:27:13 +, John Colvin wrote:
struct S {
int a;
this(T)(T v)
{
this = v;
}
void foo(T)(T v) {
import std.conv : to;
a =
struct S
{
int a;
this(T)(T v)
{
this = v;
}
void foo(T)(T v)
{
import std.conv : to;
a = v.to!int;
}
alias foo this;
}
void bar(S s){}
void main()
{
S s0;
s0 = 3;
On Tue, 10 Mar 2015 10:27:13 +, John Colvin wrote:
struct S {
int a;
this(T)(T v)
{
this = v;
}
void foo(T)(T v) {
import std.conv : to;
a = v.to!int;
}
alias foo this;
}
void bar(S s){}
void
On Tuesday, 10 March 2015 at 10:27:14 UTC, John Colvin wrote:
struct S
{
int a;
this(T)(T v)
{
this = v;
}
void foo(T)(T v)
{
import std.conv : to;
a = v.to!int;
}
alias foo this;
}