summaryrefslogtreecommitdiffhomepage
path: root/test/tile-iter.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-08 15:47:50 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-08 15:47:50 +0200
commit78273d519c9251819758c0545973c89332942c6e (patch)
tree1fd016b5cac208b6a94b59c99715cab0780970fc /test/tile-iter.cpp
parent5c9eb51cc80a7bfc6ccf1e8cc6534a1e85efb1fe (diff)
a
Diffstat (limited to 'test/tile-iter.cpp')
-rw-r--r--test/tile-iter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tile-iter.cpp b/test/tile-iter.cpp
index a6a5db8a..360b2319 100644
--- a/test/tile-iter.cpp
+++ b/test/tile-iter.cpp
@@ -31,11 +31,15 @@ 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&>);
+#if 0
+ // warns
for (const auto [x, k, pt] : c)
static_assert(std::is_same_v<decltype(x), const tile&>);
+#endif
for (auto&& [x, k, pt] : c)
static_assert(std::is_same_v<decltype(x), tile&>);
#if 0
+ // fails to compile
for (const auto&& [x, k, pt] : c)
static_assert(std::is_same_v<decltype(x), const tile&>);
#endif