Parse str into out, reporting whether the conversion is exact.
Declared in <bdldfp_decimalutil.h>
template<class STRING_TYPE>
static
int
parseDecimal128Exact(
Decimal128* out,
STRING_TYPE const& str);
Load into the specified out the decimal floating point number described by the specified str. Return 0 if out is an exact representation of str, a positive value if str is an approximation of str (i.e., str could not be represented exactly), and a negative value if str could not be parsed. The value of out is unspecified if the function returns a negative value. The parameterized STRING_TYPE must be one of bsl::string, std::string, std::pmr::string (if supported), or bslstl::StringRef.
0 if exact, positive if approximate, and negative if unparsable
| Name | Description |
|---|---|
| out | receives the parsed value |
| str | decimal text to parse |