summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-08 14:08:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-08 14:08:22 +0200
commit4d39911eea55caac4016a1f7a92fbcb202797d42 (patch)
tree67d559e2c762bd6a6c6471157d3869d0fa720b07 /test
parent036f48e9d9d13d3aa5b552c5e3997fa152aa6ba3 (diff)
a
Diffstat (limited to 'test')
-rw-r--r--test/tile-iter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tile-iter.cpp b/test/tile-iter.cpp
index f930517f..a6a5db8a 100644
--- a/test/tile-iter.cpp
+++ b/test/tile-iter.cpp
@@ -19,6 +19,8 @@ bool app::test_tile_iter() // NOLINT(readability-function-size)
static_assert(std::is_same_v<decltype(x), const tile&>);
for (auto [x, k, pt] : c)
static_assert(std::is_same_v<decltype(x), const tile&>);
+ for (auto&& [x, k, pt] : c)
+ static_assert(std::is_same_v<decltype(x), const tile&>);
}
if (always_false())
{
@@ -29,6 +31,14 @@ bool app::test_tile_iter() // NOLINT(readability-function-size)
static_assert(std::is_same_v<decltype(x), const tile&>);
for (auto [x, k, pt] : c)
static_assert(std::is_same_v<decltype(x), tile&>);
+ for (const auto [x, k, pt] : c)
+ static_assert(std::is_same_v<decltype(x), const tile&>);
+ for (auto&& [x, k, pt] : c)
+ static_assert(std::is_same_v<decltype(x), tile&>);
+#if 0
+ for (const auto&& [x, k, pt] : c)
+ static_assert(std::is_same_v<decltype(x), const tile&>);
+#endif
}
return true;
}