On Friday, 4 October 2013 at 08:23:11 UTC, Jacob Carlborg wrote:
On 2013-10-04 10:03, Zhouxuan wrote:
import std.stdio;
class A
{
static int id = 0;
this()
{
writeln("typeid=", typeid(this));
writeln("id=",typeof(this).id); //how to get ru
On Friday, 4 October 2013 at 08:23:11 UTC, Jacob Carlborg wrote:
On 2013-10-04 10:03, Zhouxuan wrote:
import std.stdio;
class A
{
static int id = 0;
this()
{
writeln("typeid=", typeid(this));
writeln("id=",typeof(this).id); //how to get ru
import std.stdio;
class A
{
static int id = 0;
this()
{
writeln("typeid=", typeid(this));
writeln("id=",typeof(this).id); //how to get runtime type of
this ??
}
}
class B : A
{
static int id = 1;
}
class C : A
{
static int id =
mixin template test()
{
int next;
}
void foo(alias l, alias t)()
{
t.next = l.next;
}
void main()
{
struct A
{
int next;
}
A a;
mixin test l1;
mixin test l2;
foo!(l1,a); //ok!
f