cpp/utility/to chars

Converts into a character string by successively filling the range, where  is required to be a valid range.

@1@ Integer formatters: is converted to a string of digits in the given  (with no redundant leading zeroes). Digits in the range (inclusive) are represented as lowercase characters. If value is less than zero, the representation starts with a minus sign. The library provides overloads for all signed and unsigned integer types and for the type as the type of the parameter.

@2@ Overload for is deleted. rejects argument of type because the result would be / but not / if it is permitted.

@3@ is converted to a string as if by std in the default ("C") locale. The conversion specifier is or  (resolving in favor of  in case of a tie), chosen according to the requirement for a shortest representation: the string representation consists of the smallest number of characters such that there is at least one digit before the radix point (if present) and parsing the representation using the corresponding  function recovers value exactly. If there are several such representations, one with the smallest difference to is chosen, resolving any remaining ties using rounding according to std.

@4@ Same as, but the conversion specified for the as-if printf is if  is ,  if  is ,  (but without leading "0x" in the result) if  is , and  if  is.

@5@ Same as, except the precision is specified by the parameter rather than by the shortest representation requirement.

@6@ 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  equals value-initialized std and  is the one-past-the-end pointer of the characters written. Note that the string is not NUL-terminated.

On error, returns a value of type holding std in, a copy of the value  in , and leaves the contents of the range  in unspecified state.

Exceptions
Throws nothing.