New hash API: Update

Johannes Pfau nospam at example.com
Mon Jun 25 02:30:41 PDT 2012


Am Sun, 24 Jun 2012 21:40:53 +0200
schrieb Alex Rønne Petersen <alex at lycus.org>:

> Also, most (if not all) Digest methods really should be pure nothrow. 
> Same for some free functions (I think it's good practice to mark 
> template functions as pure nothrow explicitly if you want to
> guarantee this).

I still don't understand pure on member functions completely. The this
pointer is considered as a function parameter, right?

So even put, start, reset... can be pure as those produce the same
result as long as they receive the same arguments and the same _this_
'state'?

I tried to add pure to the interface, but I seems it's not a good idea
right now. It doesn't work for the SHA1 implementation for example
cause that uses memcpy.



More information about the Digitalmars-d mailing list