[libcxx-commits] [PATCH] D58735: Add slice_array operator= valarray overload
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 2 14:55:44 PST 2020
ldionne added a reviewer: libc++.
ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/valarray:1267
+ _LIBCPP_INLINE_VISIBILITY
+ void operator=(const valarray<value_type>& __va) const;
+
----------------
Can you please update the synopsis?
================
Comment at: test/std/numerics/numarray/template.indirect.array/indirect.array.assign/slice_assignment.pass.cpp:3
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
----------------
This test is in the wrong file. It should be merged with `libcxx/test/std/numerics/numarray/template.slice.array/slice.arr.assign/valarray.pass.cpp` (which was not testing the right thing unless I'm mistaken).
================
Comment at: test/std/numerics/numarray/template.indirect.array/indirect.array.assign/slice_assignment.pass.cpp:24
+
+ m[std::slice(0, 3, 1)] = {1, 2, 3};
+
----------------
Can you create a `slice_array` variable here to make sure we return the right type (and hence are testing the right `operator=`?
Also, we should test that `slice_array::operator=` returns `void`.
Repository:
rCXX libc++
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58735/new/
https://reviews.llvm.org/D58735
More information about the libcxx-commits
mailing list