[libc++][format] Use forwarding references.
This implements a not accepted LWG issue. Not doing so would require
integral types to use the handle class instead of being directly stored
in the basic_format_arg.
The previous code used `std::forward` in places where it wasn't required
by the Standard. These are now removed.
Implements:
- P2418R2 Add support for std::generator-like types to std::format
- LWG 3631 basic_format_arg(T&&) should use remove_cvref_t<T> throughout
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D127570
NOKEYCHECK=True
GitOrigin-RevId: 606e280811f2e17dd3561968139873857dc0a6f8
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index c6eb835..b564017 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -47,6 +47,7 @@
- N4190 (Removing auto_ptr, random_shuffle(), And Old <functional> Stuff)
- P0154R1 (Hardware inference size)
- P0618R0 (Deprecating <codecvt>)
+- P2418R2 (Add support for ``std::generator``-like types to ``std::format``)
- Marked the following papers as "Complete" (note that some of those might have
been implemented in a previous release but not marked as such):
@@ -84,6 +85,9 @@
of throwing an exception at run-time. (This does not affect the ``v``
functions.)
+- All format functions in ``<format>`` allow the usage of non-copyable types as
+ argument for the formatting functions. This change causes bit fields to become
+ invalid arguments for the formatting functions.
API Changes
-----------
diff --git a/docs/Status/Cxx20Papers.csv b/docs/Status/Cxx20Papers.csv
index d00be2a..e44a75e 100644
--- a/docs/Status/Cxx20Papers.csv
+++ b/docs/Status/Cxx20Papers.csv
@@ -203,5 +203,5 @@
"","","","","",""
"`P2372R3 <https://wg21.link/P2372R3>`__","LWG","Fixing locale handling in chrono formatters","October 2021","",""
"`P2415R2 <https://wg21.link/P2415R2>`__","LWG","What is a ``view``","October 2021","|Complete|","14.0"
-"`P2418R2 <https://wg21.link/P2418R2>`__","LWG","Add support for ``std::generator``-like types to ``std::format``","October 2021","|Partial|",""
+"`P2418R2 <https://wg21.link/P2418R2>`__","LWG","Add support for ``std::generator``-like types to ``std::format``","October 2021","|Complete|","15.0"
"`P2432R1 <https://wg21.link/P2432R1>`__","LWG","Fix ``istream_view``","October 2021","",""
diff --git a/docs/Status/Cxx2bIssues.csv b/docs/Status/Cxx2bIssues.csv
index a406edb..e512832 100644
--- a/docs/Status/Cxx2bIssues.csv
+++ b/docs/Status/Cxx2bIssues.csv
@@ -161,4 +161,5 @@
"","","","",""
"`3645 <https://wg21.link/LWG3645>`__","``resize_and_overwrite`` is overspecified to call its callback with lvalues","Not voted in","|Complete|","14.0",""
"`3656 <https://wg21.link/LWG3656>`__","Inconsistent bit operations returning a count","Not voted in","|Complete|","15.0",""
+"`3631 <https://wg21.link/LWG3631>`__","``basic_format_arg(T&&)`` should use ``remove_cvref_t<T>`` throughout","Not voted in","|Complete|","15.0",""
"","","","",""