Re: Seperating class methods in a different module

2017-12-06 Thread Neia Neutuladh via Digitalmars-d-learn
On Thursday, 7 December 2017 at 02:32:03 UTC, helxi wrote: 1. How can I separate class methods from the declaration block? And how can I implement them in a separate module? module a; class Test { import b; mixin TestMethodImpl!(); } module b; template TestMethodImpl() { void foo(); } B

Seperating class methods in a different module

2017-12-06 Thread helxi via Digitalmars-d-learn
1. How can I separate class methods from the declaration block? And how can I implement them in a separate module? module frame; class Test { public: int x; this(); } Test.this() { x = 34; } // does not work In this scenario I would like to take the constructor to a di