Skip to content

Commit

Permalink
Removed reference qualifier on visitor template parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
odlomax committed Oct 3, 2024
1 parent df696e6 commit 229b05b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tests/array/test_array_view_variant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,31 @@ CASE("test variant assignment") {

const auto visitVariants = [](auto& var1, auto& var2, auto var3, auto var4) {
std::visit(
[](auto&& view) {
[](auto view) {
EXPECT((is_rank<1>(view)));
EXPECT((is_value_type<float>(view)));
EXPECT((is_non_const_value_type<float>(view)));
},
var1);

std::visit(
[](auto&& view) {
[](auto view) {
EXPECT((is_rank<2>(view)));
EXPECT((is_value_type<double>(view)));
EXPECT((is_non_const_value_type<double>(view)));
},
var2);

std::visit(
[](auto&& view) {
[](auto view) {
EXPECT((is_rank<3>(view)));
EXPECT((is_value_type<int>(view)));
EXPECT((is_non_const_value_type<int>(view)));
},
var3);

std::visit(
[](auto&& view) {
[](auto view) {
EXPECT((is_rank<1>(view)));
EXPECT((is_value_type<const float>(view)));
EXPECT((is_non_const_value_type<float>(view)));
Expand All @@ -94,7 +94,7 @@ CASE("test std::visit") {
auto rank1Tested = false;
auto rank2Tested = false;

const auto visitor = [&](auto&& view) {
const auto visitor = [&](auto view) {
if constexpr (is_rank<1>(view)) {
EXPECT((is_value_type<int>(view)));
auto testValue = int{0};
Expand Down

0 comments on commit 229b05b

Please sign in to comment.