[phobos] Would like to add std.log to the review queue

Jonathan M Davis jmdavisProg at gmx.com
Mon Jun 13 13:07:46 PDT 2011


On 2011-06-13 12:59, David Simcha wrote:
> On Mon, Jun 13, 2011 at 3:56 PM, Jose Armando Garcia 
<jsancio at gmail.com>wrote:
> > I can make them free standing template but to use them the client must:
> > 
> > logInfo!()("Hello world");
> 
> IFTI with parameterless templates works fine:
> 
> int doStuff()(int num) {
>     return num + 1;
> }
> 
> void main() {
>     doStuff(1);
> }

Wow. I did not know that. When I had to do that I've always templatized the 
parameter and used a template constraint to guarantee that the type was the 
one that that the parameter is always suppposed to be. Being able to have an 
empty template parameter list is much better. Thanks for the tip!

- Jonathan M Davis


More information about the phobos mailing list