Function Pointers with Type T

evilrat via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 15 21:11:59 PDT 2014


On Tuesday, 16 September 2014 at 01:08:14 UTC, amparacha wrote:
>
> thankx but all of these are not working

what do you mean? notice this is CTFE
it should pick compare function at compile time, but arguments 
may be passed at run time. so call it using enum
void sort...
{
enum result = splitPoint!(T, cmpfunc)(list, left, right); // ctfe 
part
... use result ... // run time
}


More information about the Digitalmars-d mailing list