diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv index 9ae6322b7fdbe..8cfc25099c034 100644 --- a/libcxx/docs/Status/Cxx23Issues.csv +++ b/libcxx/docs/Status/Cxx23Issues.csv @@ -137,7 +137,7 @@ "`LWG3593 `__","Several iterators' ``base() const &`` and ``lazy_split_view::outer-iterator::value_type::end()`` missing ``noexcept``","2021-10 (Virtual)","","","" "`LWG3595 `__","Exposition-only classes proxy and postfix-proxy for ``common_iterator`` should be fully ``constexpr``","2021-10 (Virtual)","|Complete|","14","" "","","","","","" -"`LWG3088 `__","``forward_list::merge`` behaviour unclear when passed ``*this``","2022-02 (Virtual)","","","" +"`LWG3088 `__","``forward_list::merge`` behaviour unclear when passed ``*this``","2022-02 (Virtual)","|Complete|","Yes","" "`LWG3471 `__","``polymorphic_allocator::allocate`` does not satisfy ``Cpp17Allocator`` requirements","2022-02 (Virtual)","","","" "`LWG3525 `__","``uses_allocator_construction_args`` fails to handle types convertible to ``pair``","2022-02 (Virtual)","","","" "`LWG3598 `__","``system_category().default_error_condition(0)`` is underspecified","2022-02 (Virtual)","","","" diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp index 6e73b2fd73726..9a162789569d3 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue.pass.cpp @@ -109,5 +109,12 @@ int main(int, char**) { } #endif + { // LWG3088: Make sure self-merging does nothing. + int a[] = {1, 2, 3, 4, 5}; + std::forward_list c(std::begin(a), std::end(a)); + c.merge(c); + assert(c == std::forward_list(std::begin(a), std::end(a))); + } + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp index fddf9f9dc0f46..4e1814044808c 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp @@ -110,5 +110,12 @@ int main(int, char**) { } #endif + { // LWG3088: Make sure self-merging does nothing. + int a[] = {5, 4, 3, 2, 1}; + std::forward_list c(std::begin(a), std::end(a)); + c.merge(c, std::greater()); + assert(c == std::forward_list(std::begin(a), std::end(a))); + } + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp index d5084eccd98da..acfa014fe2546 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp @@ -102,5 +102,12 @@ int main(int, char**) { assert(c1 == c3); } + { // LWG3088: Make sure self-merging does nothing. + int a[] = {1, 2, 3, 4, 5}; + std::forward_list c(std::begin(a), std::end(a)); + c.merge(std::move(c)); + assert(c == std::forward_list(std::begin(a), std::end(a))); + } + return 0; } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp index 235707c65370d..41b56ce7a2884 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue_pred.pass.cpp @@ -103,5 +103,12 @@ int main(int, char**) { assert(c1 == c3); } + { // LWG3088: Make sure self-merging does nothing. + int a[] = {5, 4, 3, 2, 1}; + std::forward_list c(std::begin(a), std::end(a)); + c.merge(std::move(c), std::greater()); + assert(c == std::forward_list(std::begin(a), std::end(a))); + } + return 0; }