overloading a function taking a void[][]
Timon Gehr
timon.gehr at gmx.ch
Wed Aug 8 09:53:05 PDT 2012
Try this:
template digest(Hash) if(isDigest!Hash){
digestType!Hash digest(Range)(Range data) if(!is(Range:void[][]) &&
isInputRange!Range &&
__traits(compiles,digest!Hash(ElementType!(Range).init))){
//implementation detail
}
digestType!Hash digest()(scope const(void[])[] data...){ // templated
as a workaround
//implementation detail
}
// ... (maybe more overloads)
}
More information about the Digitalmars-d-learn
mailing list