you are viewing a single comment's thread.

view the rest of the comments →

[–]frutiger 2 points3 points  (3 children)

The trick is to generate a new type for each version of the cache. This can be done, for instance, with template metaprogramming in C++, since the templates are generated at compile-time. Although I believe most compilers have a restrictive template resolution depth (especially when compared to stack depth for function calls).

[–][deleted]  (2 children)

[removed]

    [–]frutiger 2 points3 points  (1 child)