On 07/28/10 13:16, Piotr Rak wrote: [snip]
Or you could just initialize static array of pointers, like that (please note, that I never compiled code below):
[snip]
Piotr, something similar was proposed here: http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/364c0dd5ce512497# however, the response there indicates the code would be faster with a switch. I don't really understand why, especially if the array of pointers was a constexpr, but then I'm not compiler writer. -regards, Larry