Dnia 30-06-2010 o 00:13:28 strtr st...@sp.am napisał(a):
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Tue, 29 Jun 2010 17:59:37 -0400, strtr st...@sp.am wrote:
What is the pretty way to do something like this?
Class C
{
void makeNew()
{
new typeof(this);
What is the pretty way to do something like this?
Class C
{
private const char[] _name = C;// demangling this.mangleof didn't work
void makeNew()
{
mixin(`new `~_name~`();`); // the not so pretty part
}
}
On Tue, 29 Jun 2010 17:59:37 -0400, strtr st...@sp.am wrote:
What is the pretty way to do something like this?
Class C
{
void makeNew()
{
new typeof(this);
}
}
As edited...
-Steve
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Tue, 29 Jun 2010 17:59:37 -0400, strtr st...@sp.am wrote:
What is the pretty way to do something like this?
Class C
{
void makeNew()
{
new typeof(this);
}
}
As edited...
-Steve
Whahaha!
Thanks, I