normal function and template function conflict

Simen Kjaeraas simen.kjaras at gmail.com
Thu Jul 26 10:57:10 PDT 2012


On Thu, 26 Jul 2012 19:18:21 +0200, monarch_dodra <monarchdodra at gmail.com>  
wrote:

> So here are my two questions:
> 1) Is what I was originally trying to do actually illegal, or is it some  
> sort of compiler limitation? TDPL implies this should work perfectly  
> fine...

Compiler limitation. It's supposed to work.


> 2) Is there a "correct" workaround?

Exactly what you did. Though, for brevity, you would write this:

void seed(T : UIntType)(T value = default_seed)


-- 
Simen


More information about the Digitalmars-d-learn mailing list