checkpointing: another small overload fix

On Nate's advice, overload 'char' as well as 'signed char'
and 'unsigned char'.
This commit is contained in:
Steve Reinhardt 2010-07-05 22:57:23 -07:00
parent 387cbffb7a
commit 26f5a9c2cb
2 changed files with 10 additions and 0 deletions

View file

@ -334,6 +334,7 @@ STN(unsigned short);
STN(signed short);
STN(unsigned char);
STN(signed char);
STN(char);
template<>
bool to_number<bool>(const string &value, bool &retval)

View file

@ -85,6 +85,14 @@ showParam(ostream &os, const T &value)
//
// Treat 8-bit ints (chars) as ints on output, not as chars
template <>
void
showParam(ostream &os, const char &value)
{
os << (int)value;
}
template <>
void
showParam(ostream &os, const signed char &value)
@ -350,6 +358,7 @@ template void \
arrayParamIn(Checkpoint *cp, const string &section, \
const string &name, vector<type> &param);
INSTANTIATE_PARAM_TEMPLATES(char)
INSTANTIATE_PARAM_TEMPLATES(signed char)
INSTANTIATE_PARAM_TEMPLATES(unsigned char)
INSTANTIATE_PARAM_TEMPLATES(signed short)