title: Select template argument at runtime in C++
body: <p>Suppose I have a set of functions and classes which are templated to use single (<code>float</code>) or <code>double</code> precision. Of course I could write just two pieces of bootstrap code, or mess with macros. But can I just switch template argument at runtime?</p>