[test] Test unary operator+
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 26 Jan 2019 23:51:43 +0000 (00:51 +0100)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 26 Jan 2019 23:51:57 +0000 (00:51 +0100)
"Test" as in compiles..

src/test-iter.cc

index 95bfa29d1a4335aa8854b510e6dca7bc50bd3439..b40ae170524f6d4f9ccc4e8d173723cef7de04ef 100644 (file)
@@ -78,6 +78,10 @@ test_iterator (Iter it)
   for (auto c = it.iter (); c; c++)
     *c;
 
+  /* Same. */
+  for (auto c = +it; c; c++)
+    *c;
+
   it += it.len ();
   it = it + 10;
   it = 10 + it;