On 12.06.2012 10:13, cal wrote:
Does a switch statement acting on a template parameter act just like a chain of static if-else's? That is, does it just generate the code for the matching case?enum E { A, B, C } class Blah(E param) { void foo() { switch(param) { case(E.A) : blah; case(E.B) : .... default: } } }
It doesn't. It's easy to check anyway. -- Dmitry Olshansky