[libcxx-commits] [libcxx] [libc++] Verify forward_list self-merging is a no-op (PR #129985)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 6 01:01:20 PST 2025
================
@@ -109,5 +110,12 @@ int main(int, char**) {
}
#endif
+ { // Make sure self-merging does nothing.
+ int a[] = {1, 2, 3, 4, 5};
+ std::forward_list<int> c(a, a + sizeof(a) / sizeof(a[0]));
----------------
philnik777 wrote:
```suggestion
std::forward_list<int> c(std::begin(a), std::end(a));
```
https://github.com/llvm/llvm-project/pull/129985
More information about the libcxx-commits
mailing list