Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.traits, std.stdio;
- interface IFoo
- {
- }
- mixin template genFoo(string name)
- {
- mixin("class "~name~" : IFoo
- {
- }");
- }
- mixin genFoo!("Foo");
- void main()
- {
- IFoo foo = new Foo;
- Foo foo2 = new Foo;
- writeln(fullyQualifiedName!(typeof(foo)));
- writeln(typeid(foo).name);
- writeln(fullyQualifiedName!(typeof(foo2)));
- writeln(typeid(foo2).name);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement