BloombergLP::bslfmt::FormatterSpecificationNumericValue::parse

Parse a hard-coded integer or nested argument specification.

Synopsis

Declared in <bslfmt_formatterspecificationnumericvalue.h>

template<class t_ITER>
constexpr
void
parse(
    t_ITER* start,
    t_ITER end,
    bool needInitialDot);

Description

Parse the string in the random-access-iterator range specified by start and end to extract either a hard-coded integer or a nested argument specification. If the specified needInitialDot is true the string is only parsed if *start == '.' and a format_error exception is thrown if the string following the initial dot is empty. If an error occurs throw an exception of type format_error, otherwise update the output start iterator to point to the first unparsed character of the string and store the parsed result into this object.

Parameters

NameDescription
startpointer to the current parse position; updated on success to the first unparsed character
endend of the random-access-iterator range to parse
needInitialDotif true, require a leading '.' (precision)