std.log version 2
Timon Gehr
timon.gehr at gmx.ch
Sat Jun 4 10:43:07 PDT 2011
Jose Armando Garcia wrote:
> On Sat, Jun 4, 2011 at 2:04 PM, Jose Armando Garcia <jsancio at gmail.com> wrote:
>> Now on to rich boolean. I wanted to be able to print in the log
>> message why the when() expression is true. To achieve this I added a
>> struct Rich(Type)
>> which encapsulate the value and the reason for that value. Right now
>> the implementation is not every smart and just stores the reason as a
>> string.
>
> While on the subject do templates get instantiated when using alias
> even though the alias is never used. E.g.
>
> alias richBinaryFun!"a == b" richEqual;
>
> Does richBinaryFun!"a == b" get instantiated even though richEqual is
> never used?
template ttt(string s){
pragma(msg,s);
}
void main(){
alias ttt!"hello" hello; //prints "hello"
}
So yes, they do get instantiated.
Timon
More information about the Digitalmars-d
mailing list