[PATCH 1/4] Add an abstract incremental hash data type

Andi Kleen ak@linux.intel.com
Wed Jul 23 14:28:00 GMT 2014


> Btw, what will be the way to plug in an alternative hash function?
> That is, there doesn't seem to be a separation of interface
> and implementation in your patch (like with a template or a base-class
> you inherit from).

Just change the inchash.h include file. The point was to only
change a single place.

Inheritance would need changing everything again for the new type
(unless we came up with hash factories that would likely defeat
virtualization and would be over engineering)

-Andi



More information about the Gcc-patches mailing list