
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Tobias Schwinger
Oliver Kullmann wrote:
Given two sequences A and B (according to the Boost Preprocessor datastructure definition), I want to create a nested switch statement, the outer switch running through the constants in A, the inner loops running through B.
If you don't need to do it all within a macro, use file iteration: The generated code is much better to debug, human-readable and it's generated faster.
More accurately.... It's consistently generated fast. Using macro expansion alone can be faster on some compilers and much slower on others. Tobias is correct, though, that the resulting code is much easier to debug without running the result through a formatter. The downside is that the scaffolding tends to take over a file. Regards, Paul Mensonides