#include
using namespace std;
class Conversion
{
public:
static bool toInt(const char * value, int &returned);
static bool toUShortInt(const char *value, unsigned short &returned);
template
};
template
bool Conversion::fromString(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&))
{
std::istringstream iss(s);
return !(iss >> f >> t).fail();
}
bool Conversion::toInt(const char *value, int &returned)
{
return fromString
}
bool Conversion::toUShortInt(const char *value, unsigned short &returned)
{
return fromString
}