On Thursday, July 26, 2012 21:49:35 Andrej Mitrovic wrote: > On 7/26/12, Jacob Carlborg <d...@me.com> wrote: > > void seed () (UIntType value = default_seed) > > > > Less typing as well. > > Yep. It's funny how this works at all. I mean a template with no > template parameters is somehow still a template. :)
It _is _ bit funny, but Ibelieve that it comes from permitting empty template parameter lists. Without that, recursion with eponymous templates would become problematic. e.g. enum template myTemplate(T...) { static if(T.length == 0) enum myTemplate = 42; else enum myTemplate = T[0] * 3 + myTemplate!(T[1 .. $]); } needs to be able to take an empty parameter list. It's probably possible to make that work without allowing an outright empty parameter list that isn't even a variadic template, but I suspect that it's just easier to allow it. - Jonathan M Davis