Am Thu, 9 Aug 2012 10:20:45 +0200
schrieb Johannes Pfau :
> arguments of any type.
Sorry, seems this isn't true. Not sure where I got that information
from, void[][]... only works with all array types, not all types in
general.
Am Wed, 08 Aug 2012 21:55:21 +0200
schrieb Timon Gehr :
>
> Well, I have done similar things in the past. The general concept
> should work.
>
> > BTW: This is a working version, but it does cause template bloat:
> > http://dpaste.dzfl.pl/d42a58aa
> >
>
> Maybe this helps:
> http://dpaste.dzfl.
On 08/08/2012 09:11 PM, Johannes Pfau wrote:
Am Wed, 08 Aug 2012 18:53:05 +0200
schrieb Timon Gehr:
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!(Ran
Am Wed, 08 Aug 2012 18:53:05 +0200
schrieb Timon Gehr :
> 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))){
> //impl
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[
I wanted to add a new overload to digest for the std.hash module (see
review in main newsgroup). This is the code written as two functions
which should be combined in one overloaded function
digestType!Hash digest(Hash)(scope const(void[])[] data...)
if(isDigest!Hash)
{
//