use template function without assignment

Ali Çehreli acehreli at yahoo.com
Tue Jul 30 11:38:22 PDT 2013


On 07/30/2013 06:16 AM, Meta wrote:

 > Can you post some more code that exhibits exactly the behaviour you're
 > describing? I can't replicate the problem you're having with the code
 > you provided (nor the code *I* provided).

Ditto.

JS, I wrote the following code for you. Could you please start with it 
and show us the problem that we are trying to solve.

template Pragma(alias amsg)
{
     void Pragma(string file = __FILE__)
     {
         pragma(msg, amsg);
     }
}

void main()
{
     enum msg = "hello";
     Pragma!msg;
}

Ali



More information about the Digitalmars-d-learn mailing list