---- import std.typecons;
Rebindable!(immutable TestImpl) Test;
class TestImpl
{
void foo() {}
Test test() { __gshared x = new immutable TestImpl; return
rebindable(x); }
}
void main()
{
Test t = Test.test;
}
----
chmike via Digitalmars-d-learn Mon, 30 May 2016 01:31:35 -0700
---- import std.typecons;
Rebindable!(immutable TestImpl) Test;
class TestImpl
{
void foo() {}
Test test() { __gshared x = new immutable TestImpl; return
rebindable(x); }
}
void main()
{
Test t = Test.test;
}
----