Getting the const-correctness of Object sorted once and for all

Stewart Gordon smjg_1998 at yahoo.com
Sun May 13 10:27:18 PDT 2012


On 13/05/2012 18:04, Alex Rønne Petersen wrote:
<snip>
> But how would you memoize the value in the instance of the object if it's const?

By storing the memoized value outside of the object.  Read the code of 
std.functional.memoize - you'll see that it holds the values in a static AA.

Stewart.


More information about the Digitalmars-d mailing list