MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / as_integer

Function as_integer

include/jsoncons/basic_json.hpp:3685–3693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3683
3684 template <typename T>
3685 T as_integer() const
3686 {
3687 auto result = try_as_integer<T>();
3688 if (!result)
3689 {
3690 JSONCONS_THROW(conv_error(result.error().code()));
3691 }
3692 return *result;
3693 }
3694
3695 template <typename T>
3696 typename std::enable_if<ext_traits::is_signed_integer<T>::value && sizeof(T) <= sizeof(int64_t),bool>::type

Callers

nothing calls this directly

Calls 3

conv_errorClass · 0.85
errorMethod · 0.80
codeMethod · 0.45

Tested by

no test coverage detected