Daily Shaarli

All links of one day in a single page.

August 28, 2014

Automatic memoization in C++0x

Memoization is a pretty well-known optimization technique which consists in “remembering” (i.e.: caching) the results of previous calls to a function, so that repeated calls with the same parameters are resolved without repeating the original computation.

appearing and disappearing consts.pdf

This article examines various aspects of type declaration and deduction in both current standard
C++ as well as the forthcoming revised standard (C++0x), with an eye towards helping developers
understand how and why the effective type of a variable can be different from what's “obvious.”
Readers will find the article most useful if they are familiar with the basic rules for template argu

ment deduction, are aware of the difference between lvalues and rvalues, and have had some
exposure to the new C++0x features lvalue and rvalue references,
auto
variables, and lambda
expressions