35 int status = asn_INTEGER2long(&_INTEGER_in, &out);
37 throw std::range_error(
"Failed to convert INTEGER_t to int64_t");
38 INTEGER_out =
static_cast<int64_t
>(out);
44 int status = asn_INTEGER2ulong(&_INTEGER_in, &out);
46 throw std::range_error(
"Failed to convert INTEGER_t to uint64_t");
47 INTEGER_out =
static_cast<uint64_t
>(out);
52 if (std::numeric_limits<T>::max() < _INTEGER_in)
53 throw std::range_error(
"Failed to convert long (" + std::to_string(_INTEGER_in) +
") to smaller integer type (max: " + std::to_string(std::numeric_limits<T>::max()) +
")");
54 INTEGER_out =
static_cast<T
>(_INTEGER_in);
58 INTEGER_out = _INTEGER_in;
63 const long in =
static_cast<long>(_INTEGER_in);
64 int status = asn_long2INTEGER(&INTEGER_out, in);
66 throw std::range_error(
"Failed to convert int64_t to INTEGER_t");
70 INTEGER_out = _INTEGER_in;
75 throw std::range_error(
"Failed to convert int64_t to unsigned long");
76 INTEGER_out =
static_cast<unsigned long>(_INTEGER_in);