diff --git a/libcxx/docs/Status/Cxx2bIssues.csv b/libcxx/docs/Status/Cxx2bIssues.csv --- a/libcxx/docs/Status/Cxx2bIssues.csv +++ b/libcxx/docs/Status/Cxx2bIssues.csv @@ -286,7 +286,7 @@ "`3772 `__","``repeat_view``'s ``piecewise`` constructor is missing Postconditions","February 2023","","","|ranges|" "`3786 `__","Flat maps' deduction guide needs to default ``Allocator`` to be useful","February 2023","","","" "`3803 `__","``flat_foo`` constructors taking ``KeyContainer`` lack ``KeyCompare`` parameter","February 2023","","","" -"`3810 `__","CTAD for ``std::basic_format_args``","February 2023","","","|format|" +"`3810 `__","CTAD for ``std::basic_format_args``","February 2023","|Complete|","17.0","|format|" "`3827 `__","Deprecate ```` and ```` macros","February 2023","","","" "`3828 `__","Sync ``intmax_t`` and ``uintmax_t`` with C2x","February 2023","","","" "`3833 `__","Remove specialization ``template struct formatter``","February 2023","","","|format|" diff --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h --- a/libcxx/include/__format/format_args.h +++ b/libcxx/include/__format/format_args.h @@ -71,7 +71,9 @@ const basic_format_arg<_Context>* __args_; }; }; -_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(basic_format_args); + +template +basic_format_args(__format_arg_store<_Context, _Args...>) -> basic_format_args<_Context>; #endif //_LIBCPP_STD_VER >= 20 diff --git a/libcxx/test/std/utilities/format/format.arguments/format.args/ctad.compile.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.args/ctad.compile.pass.cpp new file mode 100644 --- /dev/null +++ b/libcxx/test/std/utilities/format/format.arguments/format.args/ctad.compile.pass.cpp @@ -0,0 +1,31 @@ +//===----------------------------------------------------------------------===// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14, c++17 +// UNSUPPORTED: libcpp-has-no-incomplete-format + +// + +// template +// basic_format_args(format-arg-store) -> basic_format_args; + +#include +#include + +#include "test_macros.h" + +void test() { + // Note the Standard way to create a format-arg-store is by using make_format_args. + static_assert(std::same_as>); + +#ifndef TEST_HAS_NO_WIDE_CHARACTERS + static_assert(std::same_as>); + +#endif +}