[libcxx-commits] [PATCH] D103357: [libc++][format] Add __format_arg_store.
Victor Zverovich via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jun 20 06:44:55 PDT 2021
vitaut accepted this revision.
vitaut added a comment.
LGTM but this will need to be reviewed by someone familiar with libc++ of course =).
================
Comment at: libcxx/include/__format/format_arg.h:69
+ case __format::__arg_t::__none:
+ __throw_format_error("Argument index out of bounds");
+ case __format::__arg_t::__bool:
----------------
Mordante wrote:
> vitaut wrote:
> > Visiting an empty argument should pass `monostate` to the visitor, not throw an exception.
> I thought this was an allowed optimization, but that seems not to be the case.
> Adding `monostate` will require including `<variant>`. At the moment we're busy modularizing our headers, but that unveils some clang issues. So I'll include the entire header with a TODO.
> This change will break some other patches; I'll update them later.
Microsoft STL pulled out monostate into a separate header to avoid including variant.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103357/new/
https://reviews.llvm.org/D103357
More information about the libcxx-commits
mailing list