Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions stl/inc/format
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,9 @@ private:
const _Format_arg_index* _Index_array = nullptr;
};

template <class _Context, class... _Args>
basic_format_args(_Format_arg_store<_Context, _Args...>) -> basic_format_args<_Context>;
Comment on lines +1994 to +1995

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change requested, note to other reviewers: Deduction guides can't be exported for modules, they're just automatically available if the class is exported (which is the case here), so the lack of any _EXPORT_STD is normal.


// _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
Expand Down
8 changes: 8 additions & 0 deletions tests/std/tests/P0645R10_text_formatting_args/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,19 @@ void test_visit_monostate() {
assert(visit_format_arg(visitor<Context>, basic_format_arg<Context>()) == Arg_type::none);
}

template <class Context>
void test_lwg3810() {
[[maybe_unused]] auto args_store = make_format_args<Context>(1, 2, 3);
static_assert(same_as<decltype(basic_format_args{args_store}), basic_format_args<Context>>);
}

int main() {
test_basic_format_arg<format_context>();
test_basic_format_arg<wformat_context>();
test_format_arg_store<format_context>();
test_format_arg_store<wformat_context>();
test_visit_monostate<format_context>();
test_visit_monostate<wformat_context>();
test_lwg3810<format_context>();
test_lwg3810<wformat_context>();
}