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 @@ -2208,6 +2208,9 @@ private:
_Out&& _OutputIt_, const basic_format_args<basic_format_context>& _Ctx_args, const _Lazy_locale& _Loc_)
: _OutputIt(_STD move(_OutputIt_)), _Args(_Ctx_args), _Loc(_Loc_) {}

basic_format_context(const basic_format_context&) = delete;
basic_format_context& operator=(const basic_format_context&) = delete;

public:
using iterator = _Out;
using char_type = _CharT;
Expand Down
3 changes: 3 additions & 0 deletions tests/libcxx/expected_results.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitiali
std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp FAIL
std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp FAIL

# libc++ doesn't implement LWG-4061
std/utilities/format/format.functions/bug_81590.compile.pass.cpp FAIL
Copy link
Contributor Author

@frederick-vs-ja frederick-vs-ja Jun 30, 2024

Choose a reason for hiding this comment

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

This test is weird. It has a formatter specialization whose format function passes basic_format_context by value, which is unexpected.


# 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 @@ -266,8 +266,13 @@ void test_basic_format_context_construction() {
using context = basic_format_context<OutIt, CharT>;

static_assert(!is_default_constructible_v<context>);
static_assert(is_copy_constructible_v<context> == is_copy_constructible_v<OutIt>);
static_assert(is_move_constructible_v<context>);
static_assert(!is_copy_constructible_v<context>);
static_assert(!is_move_constructible_v<context>);

// Also test the deleted copy assignment operator
// from LWG-4061 "Should std::basic_format_context be default-constructible/copyable/movable?"
static_assert(!is_copy_assignable_v<context>);
static_assert(!is_move_assignable_v<context>);

static_assert(!is_constructible_v<context, OutIt, basic_format_args<context>>);
static_assert(!is_constructible_v<context, OutIt, const basic_format_args<context>&>);
Expand Down