more shuffling

This commit is contained in:
Michael Davidsaver
2019-10-24 13:27:46 -07:00
parent 5426a34547
commit 2497350fcd
5 changed files with 70 additions and 11 deletions
+19
View File
@@ -10,7 +10,10 @@
#include <ctype.h>
#include <epicsStdlib.h>
#include <pvxs/util.h>
#include "utilpvt.h"
namespace pvxs {
@@ -218,3 +221,19 @@ std::ostream& operator<<(std::ostream& strm, const SockAddr& addr)
}
}
namespace pvxsimpl {
namespace detail {
template<>
unsigned short as_str<unsigned short>::op(const char *s)
{
epicsUInt16 ret;
if(int err = epicsParseUInt16(s, &ret, 0, nullptr)) {
(void)err;
throw std::runtime_error(SB()<<"Unable to parse as uint16 : "<<s);
}
return ret;
}
}}