RE: optimization question: mpl

2011-10-17 Thread Hite, Christopher
> void foo<0>(int id, DecodeContext& dc) {} int main(){ DecodeContext& dc= *(DecodeContext*)0;// junk for now int id=std::rand(); // runtime dependent foo<50>(id,dc); return 0; } -Original Message- From: Piotr Rak [mailto:piotr@gma

optimization question: mpl

2010-07-28 Thread Hite, Christopher
I'm writing a decoder using a meta programming techniques alla boost::mpl and I'd like to know if I'm asking too much of the compiler. Basically I've got lots of packet types with different ids. The classical way to write these would be a switch case int id; switch(id){

RE: optimization question: mpl

2010-07-28 Thread Hite, Christopher
> Generally without knowing the compiler version you are using > it is hard to tell. I'll use whatever's best. Right now I'm still on 4.4.3. I'll probably upgrade soon to 4.5. > The same is true without a complete compilable testcase. I didn't want to make a test case that depends on boost::mp