template debuging

Ali Çehreli acehreli at yahoo.com
Thu Jul 18 06:17:08 PDT 2013


On 07/18/2013 05:32 AM, JS wrote:

 > immutable bool _MyLibrary_DEBUG_ = true;
 >
 > is a library level debug toggle, not whole program... it won't effect
 > other libraries.

debug can have tags:

     debug (myLibrary)
     {
         // ...
     }

     debug (myLibrary) writeln("it worked!");

Enabled by the -debug=myLibrary compiler switch.

Ali



More information about the Digitalmars-d-learn mailing list