parse: add specialisation for int
This commit is contained in:
parent
bfcd63ec65
commit
36902f1476
@ -84,3 +84,12 @@ C_PARSE(unsigned long long, i)
|
|||||||
C_PARSE(float, f)
|
C_PARSE(float, f)
|
||||||
C_PARSE(double, f)
|
C_PARSE(double, f)
|
||||||
C_PARSE(long double, f)
|
C_PARSE(long double, f)
|
||||||
|
|
||||||
|
|
||||||
|
template <>
|
||||||
|
int
|
||||||
|
util::parse<int> (util::view<const char*> str)
|
||||||
|
{
|
||||||
|
auto intermediate = util::parse<long> (str);
|
||||||
|
return trunc_cast<int> (intermediate);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user