Is this a bug?

Sean Eskapp eatingstaples at gmail.com
Sun Jan 9 14:28:32 PST 2011


This code works fine:

	int[] arr = [ 1, 2, 3, 4, 5 ];
	auto myMax = function int(int a, int b) { return (a > b) ? a : b; };
	auto biggest = reduce!(myMax)(arr);

But passing the function literal directly to reduce causes an error. Is this
intentional?


More information about the Digitalmars-d mailing list