[libcxx-commits] [PATCH] D119349: [libc++][format] LWG-3654 basic_format_context::arg(size_t) should be noexcept
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 9 08:55:30 PST 2022
Mordante created this revision.
Mordante requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Note the update of the status table will be done in a separate commit.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119349
Files:
libcxx/include/__format/format_context.h
libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
Index: libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
===================================================================
--- libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
+++ libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
@@ -34,6 +34,7 @@
const std::basic_format_context context =
test_format_context_create(OutIt{output}, args);
LIBCPP_ASSERT(args.__size() == 4);
+ ASSERT_NOEXCEPT(context.arg(0));
for (size_t i = 0, e = args.__size(); i != e; ++i) {
assert(context.arg(i));
}
Index: libcxx/include/__format/format_context.h
===================================================================
--- libcxx/include/__format/format_context.h
+++ libcxx/include/__format/format_context.h
@@ -98,7 +98,7 @@
basic_format_context& operator=(const basic_format_context&) = delete;
_LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context>
- arg(size_t __id) const {
+ arg(size_t __id) const noexcept {
return __args_.get(__id);
}
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119349.407177.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220209/157e65b8/attachment.bin>
More information about the libcxx-commits
mailing list