Compile error!
sdv via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 31 21:26:43 PDT 2015
import std.stdio;
import core.memory;
struct sQueue(T)
{
struct sNode
{
T mfPayload = T.init;
union{
typeof(this)* mfPrev;
shared(typeof(this)*) mfShPrev;
}
union{
typeof(this)* mfNext;
shared(typeof(this)*) mfShNext;
}
}
//shared(sQueueNode) mfRoot;
sNode mfRoot;
void pfPut(T v,sNode* r = null)
{
if(r is null) r = &this.mfRoot;
shared auto n = new sNode(v);
}
}
int main(string[] argv)
{
auto b1 = new sQueue!uint;
writeln("Hello D-World!");
writeln("Hello D-World!");
writeln("Hello D-World!");
return 0;
}
More information about the Digitalmars-d
mailing list