Skip to content

Commit

Permalink
Docs: add comment about empty format context range
Browse files Browse the repository at this point in the history
  • Loading branch information
leha-bot authored and vitaut committed Jun 2, 2022
1 parent ba50c19 commit 8644654
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ template and implement ``parse`` and ``format`` methods::
// parse specifiers until '}' or the end of the range. In this example
// the formatter should parse the 'f' specifier and return an iterator
// pointing to '}'.
// Please also note that this character range may be empty, in case of
// the "{}" format string, so therefore you should check ctx.begin()
// for equality with ctx.end().

// Parse the presentation format and store it in the formatter:
auto it = ctx.begin(), end = ctx.end();
Expand Down

0 comments on commit 8644654

Please sign in to comment.