[libcxx-commits] [PATCH] D145847: [libc++][format] Implements LWG3892.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 8 02:13:27 PDT 2023
Mordante marked 3 inline comments as done.
Mordante added a comment.
Thanks for the reviews!
================
Comment at: libcxx/include/__format/range_formatter.h:265
+ __parse_ctx.advance_to(__begin);
+ [[maybe_unused]] typename _ParseContext::iterator __result = __underlying_.parse(__parse_ctx);
+ _LIBCPP_ASSERT(__result == __begin,
----------------
EricWF wrote:
> Is there a reason for always doing this rather than just guarding it in a macro?
I'm not entirely sure what you mean. But we need to call `__underlying_.parse(__parse_ctx);` even when the range is empty.
Calling the parse member of the formatter is an observable effect by the parser, there are tests to validate the call is made.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145847/new/
https://reviews.llvm.org/D145847
More information about the libcxx-commits
mailing list