aboutsummaryrefslogtreecommitdiff
path: root/test/ring.cc
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-19 21:51:30 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-19 21:51:30 +0100
commit3544d9c12fcb66ff8d4dd947137a769eb99f26c2 (patch)
treee870d52f7189141283840de348b9ded770a6cc4e /test/ring.cc
parent9f051299964628452a10b80fff7b372e42b4fa32 (diff)
downloadcpp-utils-3544d9c12fcb66ff8d4dd947137a769eb99f26c2.tar.gz
cpp-utils-3544d9c12fcb66ff8d4dd947137a769eb99f26c2.zip
ring: add pre cpp17 take() fn
Diffstat (limited to 'test/ring.cc')
-rw-r--r--test/ring.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ring.cc b/test/ring.cc
index a42efaa..657fdfa 100644
--- a/test/ring.cc
+++ b/test/ring.cc
@@ -56,14 +56,14 @@ int main() {
assert(!r.is_empty());
assert(r.is_full());
-#if __cplusplus >= 201703L
auto v = r.take();
+#if __cplusplus >= 201703L
assert(v.has_value());
+#endif
assert(r.size() == 7);
assert(!r.is_empty());
assert(!r.is_full());
-#endif
assert(m::cnt == 8);
}