Trying Multiple Aggregate reduce

monarch_dodra monarchdodra at gmail.com
Wed Apr 2 02:53:15 PDT 2014


On Wednesday, 2 April 2014 at 09:25:53 UTC, Nordlöw wrote:
>> so happens to support this. So I added your code to the test 
>> cases:
>
> Great!
>
> BTW: Why is static qualifier needed on definition of 
> minmaxElement() in the unittest?

Whenever you declare something in a nested context, it may or may 
not have a hidden context pointer, depending on the type, and the 
implementation.

"static", in this context, ensures this does not happen. It's not 
actually *needed* in this context though. It's more of a matter 
of style.

In your example, the function was declared in global context, so 
the "static" would have been gratuitous.


More information about the Digitalmars-d-learn mailing list