[libcxx-commits] [PATCH] D113364: [libc++] Adds missing forward_list merge tests.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 9 11:11:22 PST 2021


Mordante marked 2 inline comments as done.
Mordante added inline comments.


================
Comment at: libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_lvalue_pred.pass.cpp:65
+#endif
+    P po[3] = {&*io[0], &*io[1], &*io[2]};
+
----------------
Quuxplusone wrote:
> I assume this is copied from an existing test, because otherwise `typedef T* P;` is certainly overkill. ;) No complaints if we're just matching somewhere else, though.
It was copied/moved from `merge_pred.pass.cpp`. I added the `P` just for consistency, but I agree it's a bit of overkill. 


================
Comment at: libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp:9
+
+// UNSUPPORTED: c++03
+
----------------
Quuxplusone wrote:
> Honestly this probably works in c++03 mode, too, doesn't it?
No it doesn't `forward_list`:837
```
#ifndef _LIBCPP_CXX03_LANG
    _LIBCPP_INLINE_VISIBILITY
    void merge(forward_list&& __x) {merge(__x, __less<value_type>());}
    template <class _Compare>
        _LIBCPP_INLINE_VISIBILITY
        void merge(forward_list&& __x, _Compare __comp)
        {merge(__x, _VSTD::move(__comp));}
#endif // _LIBCPP_CXX03_LANG
```

But judging by your question and your recent commits I guess I'll test whether this code can be made available in C++03. Obviously that will be in a separate patch.
(At least I will fix the horrible indention.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113364/new/

https://reviews.llvm.org/D113364



More information about the libcxx-commits mailing list