[phobos] datetime review

Simen Kjaeraas simen.kjaras at gmail.com
Sat Oct 9 13:54:02 PDT 2010


Andrei Alexandrescu <andrei at erdani.com> wrote:
> * "this(string msg, string file = __FILE__, size_t line = __LINE__,  
> Throwable next = null) nothrow" -> the __FILE__ and __LINE__ are useless  
> (they are yours, not your caller's). You need to make them template  
> parameters to work, see other places in Phobos. At least that's what I  
> recall. Walter?

You're wrong, they are replaced at call point.


> long convert(TUnit from, TUnit to)(long);

Couldn't this be more succinct by copying std.conv.to's system?

i.e:
assert( convert!years( months( 24 ) ) == 2 );

-- 
Simen


More information about the phobos mailing list