Hi, I have a class like this:
class MyClass{
public:
MyClass(int Mode);
private:
std::map < int, std::string, CompFunc > data;
};
The data member must use different comparison function according to Mode argument.
if Mode == 1, then use CompFunc1.
if Mode == 2, then use CompFunc2.
etc.
but the CompFunc template argument is fixed there, how could I make it dynamically?
thanks.