Return the closest floating point representation to the specified value.

Synopsis

Declared in <bdljsn_numberutil.h>

static
float
asFloat(std::string_view const& value);

Description

If value is outside the representable range, return +INF or ‐INF (as appropriate). The behavior is undefined unless isValidNumber(value) is true.

Return Value

the closest float representation of value

Parameters

Name

Description

value

JSON number text to convert

Created with MrDocs