Peng Yu
Hi,
The following program uses virtual functions. Essentially I need to go through all the pairs in 'v'.
Since I have already know what are in v at compile time. I would like to convert the dynamic polymorphism to template. Therefore, the runtime would be better. I think this should be done with the help of boost::mpl. But I'm not sure how to do it. Would you please help me?
You can use boost::fusion::vector (or boost::tuple) as a
container. You can use boost::fusion::for_each to iterate
through it (there are other algorithms in fusion of course).
#include <iostream>
#include