
3 Nov
2006
3 Nov
'06
9:37 p.m.
FWIW - I'm comfortable with the idea of considering metaprogaming as similar to C++ macros on steriods. This fits in well with the term "metaprogramming" - programming the writing of a program. It also helps your brain from getting too confused between compile time and runtime behavior. When on get's used to this then it never occurs for one to write something like example below. And once your brain gets comfortable with this, MPL seems very, very natural. Robert Ramey
template <typename X> X divide_em(X x, X y) { if (typeid(x) == typeid(std::string)) return x; else return x/y; }
std::cout << divide_emstd::string("one", "two");