[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
Fri Feb 11 08:42:30 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb6d6b8c9d876: [libc++][format] LWG-3654 basic_format_context::arg(size_t) should be noexcept (authored by Mordante).

Changed prior to commit:
  https://reviews.llvm.org/D119349?vs=407177&id=407894#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119349/new/

https://reviews.llvm.org/D119349

Files:
  libcxx/docs/Status/Cxx2bIssues.csv
  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
Index: libcxx/docs/Status/Cxx2bIssues.csv
===================================================================
--- libcxx/docs/Status/Cxx2bIssues.csv
+++ libcxx/docs/Status/Cxx2bIssues.csv
@@ -154,7 +154,7 @@
 "`3648 <https://wg21.link/LWG3648>`__","``format`` should not print ``bool`` with ``'c'`` ","February 2022","","","|format|"
 "`3649 <https://wg21.link/LWG3649>`__","[fund.ts.v2] Reinstate and bump ``__cpp_lib_experimental_memory_resource`` feature test macro","February 2022","",""
 "`3650 <https://wg21.link/LWG3650>`__","Are ``std::basic_string`` 's ``iterator`` and ``const_iterator`` constexpr iterators?","February 2022","|Nothing to do|",""
-"`3654 <https://wg21.link/LWG3654>`__","``basic_format_context::arg(size_t)`` should be ``noexcept`` ","February 2022","","","|format|"
+"`3654 <https://wg21.link/LWG3654>`__","``basic_format_context::arg(size_t)`` should be ``noexcept`` ","February 2022","|Complete|","15.0","|format|"
 "`3657 <https://wg21.link/LWG3657>`__","``std::hash<std::filesystem::path>`` is not enabled","February 2022","",""
 "`3660 <https://wg21.link/LWG3660>`__","``iterator_traits<common_iterator>::pointer`` should conform to ยง[iterator.traits]","February 2022","|Complete|","14.0"
 "`3661 <https://wg21.link/LWG3661>`__","``constinit atomic<shared_ptr<T>> a (nullptr);`` should work","February 2022","",""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119349.407894.patch
Type: text/x-patch
Size: 2495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220211/620231a9/attachment.bin>


More information about the libcxx-commits mailing list