parse: instantiate unsigned in parsing

This commit is contained in:
Danny Robson 2018-03-27 16:11:04 +11:00
parent 14e2fc5bd5
commit 951b160d0d

View File

@ -95,3 +95,11 @@ util::parse<int> (util::view<const char*> str)
auto intermediate = util::parse<long> (str);
return util::cast::lossless<int> (intermediate);
}
template <>
unsigned
util::parse<unsigned> (util::view<const char*> str)
{
return util::cast::narrow<unsigned> (parse<unsigned long> (str));
}