Say I have a class, that wraps some mathematic operation. Lets use a toy example
class Test
{
public:
Test( float f ) : mFloat( f ), mIsInt( false ) {}
fl
Using template specialization:
class Config {
template
void setValue(const std::string& index, T& value); //sets the value if available
};
template
void Config::setValue(const std::string& index, float& value){...} //only sets float values
template
void Config::setValue(const std::string& index, int& value){...} //only sets int values;