Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LWG-4106 basic_format_args should not be default-constructible #4757

Merged
merged 3 commits into from
Jul 5, 2024
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
2 changes: 0 additions & 2 deletions stl/inc/format
Original file line number Diff line number Diff line change
Expand Up @@ -2079,8 +2079,6 @@ class _Format_arg_store<_Context> {};
_EXPORT_STD template <class _Context>
class basic_format_args {
public:
basic_format_args() noexcept = default;

basic_format_args(const _Format_arg_store<_Context>&) noexcept {}

template <class... _Args>
Expand Down
4 changes: 4 additions & 0 deletions tests/libcxx/expected_results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.ite
# libc++ doesn't implement LWG-4061
std/utilities/format/format.functions/bug_81590.compile.pass.cpp FAIL

# libc++ doesn't implement LWG-4106
std/utilities/format/format.arguments/format.args/ctor.pass.cpp FAIL
std/utilities/format/format.arguments/format.args/get.pass.cpp FAIL

# If any feature-test macro test is failing, this consolidated test will also fail.
std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp FAIL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ void test_basic_format_context_construction() {
static_assert(!is_constructible_with_trailing_empty_brace_impl<context>);
static_assert(!is_constructible_with_trailing_empty_brace_impl<context, OutIt, basic_format_args<context>>);
static_assert(!is_constructible_with_trailing_empty_brace_impl<context, OutIt, const basic_format_args<context>&>);

// Also test LWG-4106 "basic_format_args should not be default-constructible"
static_assert(!is_default_constructible_v<basic_format_args<context>>);
}

// Test GH-4636 "<format>: Call to next_arg_id may result in unexpected error (regression)"
Expand Down