Relative Content

Tag Archive for c++macrosmetaprogramming

Can this C++ template be simplified with a C MACRO?

I have a template class with a read() method. It needs to call a C functions: read1(), read2(), read3() etc based upon the template parameter value. Is there is a cleaner way to do this than a switch on the template value? I have tried using a MACRO: