iterator tags idiom and compile-time algorithm selection

7:39:00 PM 0 Comments A+ a-

Compile-time algorithm selection can be done using function overloading and traits idiom. It is a quite useful technique in generic programming. In this technique usually a set of "selector" types are used to select one among many overloaded functions. Note that the number of parameters to these overloaded functions is same but there is a "selector" type at the end of the parameter list. A use of that technique based on standard defined iterator tags is shown here.