diff --git a/stl/inc/format b/stl/inc/format index 9e3a41df7d..ecfad75dbe 100644 --- a/stl/inc/format +++ b/stl/inc/format @@ -1991,6 +1991,9 @@ private: const _Format_arg_index* _Index_array = nullptr; }; +template +basic_format_args(_Format_arg_store<_Context, _Args...>) -> basic_format_args<_Context>; + // _Lazy_locale is used instead of a std::locale so that the locale is only // constructed when needed, and is never constructed if the format string does not // contain locale-sensitive format specifiers. Note that this means that a new locale diff --git a/tests/std/tests/P0645R10_text_formatting_args/test.cpp b/tests/std/tests/P0645R10_text_formatting_args/test.cpp index 85a1784d7b..d4b3024df3 100644 --- a/tests/std/tests/P0645R10_text_formatting_args/test.cpp +++ b/tests/std/tests/P0645R10_text_formatting_args/test.cpp @@ -229,6 +229,12 @@ void test_visit_monostate() { assert(visit_format_arg(visitor, basic_format_arg()) == Arg_type::none); } +template +void test_lwg3810() { + [[maybe_unused]] auto args_store = make_format_args(1, 2, 3); + static_assert(same_as>); +} + int main() { test_basic_format_arg(); test_basic_format_arg(); @@ -236,4 +242,6 @@ int main() { test_format_arg_store(); test_visit_monostate(); test_visit_monostate(); + test_lwg3810(); + test_lwg3810(); }