[iter] Test that default-constructed iterators are empty

This commit is contained in:
Behdad Esfahbod 2019-01-26 22:54:25 +01:00
parent f35e7eabf1
commit 2aff6d9625
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ test_iterator (Iter it)
{
Iter default_constructed;
assert (!default_constructed);
/* Iterate over a copy of it. */
for (auto c = it.iter (); c; c++)
*c;