cpp/utility/from chars

Analyzes the character sequence for a pattern described below. If no characters match the pattern or if the value obtained by parsing the matched characters is not representable in the type of, is unmodified, otherwise the characters matching the pattern are interpreted as a text representation of an arithmetic value, which is stored in.

@1@ Integer parsers: Expects the pattern identical to the one used by std in the default ("C") locale and the given non-zero numeric base, except that The library provides overloads for all signed and unsigned integer types and as the referenced type of the parameter.
 * or prefixes are not recognized if  is 16
 * only the minus sign is recognized (not the plus sign), and only for signed integer types of
 * leading whitespace is not ignored.

@2@ Floating-point parsers: Expects the pattern identical to the one used by std in the default ("C") locale, except that
 * the plus sign is not recognized outside of the exponent (only the minus sign is permitted at the beginning)
 * if has  set but not, the exponent part is required (otherwise it is optional)
 * if has  set but not, the optional exponent is not permitted
 * if is, the prefix  or  is not permitted (the string  parses as the value  with unparsed remainder )
 * leading whitespace is not ignored.

@@ In any case, the resulting value is one of at most two floating-point values closest to the value of the string matching the pattern, after rounding according to std.

@3@ The return type (see Return value below). has no base classes, or members other than, and implicitly declared special member functions.

Return value
On success, returns a value of type such that  points at the first character not matching the pattern, or has the value equal to  if all characters match and  is value-initialized.

If there is no pattern match, returns a value of type such that  equals  and  equals std. is unmodified.

If the pattern was matched, but the parsed value is not in the range representable by the type of, returns value of type  such that  equals std and  points at the first character not matching the pattern. is unmodified.

Exceptions
Throws nothing.