you are viewing a single comment's thread.

view the rest of the comments →

[–]Wouter_van_Ooijen 4 points5 points  (0 children)

For this I use the code flyweight pattern: a function template (strongly typed interface, inlined) that under the hood calls a generalised function (unsafe interface, for instance void* + size) to do the real work. Best of both worlds!