libstdc++-v3/testsuite/23_containers/unordered_set/debug/114316.cc
raw| 1 | // { dg-do run { target c++11 } } |
| 2 | // { dg-require-debug-mode "" } |
| 3 | |
| 4 | // PR libstdc++/114316 |
| 5 | |
| 6 | #include <unordered_set> |
| 7 | #include <algorithm> |
| 8 | |
| 9 | #include <testsuite_hooks.h> |
| 10 | |
| 11 | void test01() |
| 12 | { |
| 13 | std::unordered_set<int>::iterator it{}; |
| 14 | VERIFY( std::find(it, it, 0) == it ); |
| 15 | } |
| 16 | |
| 17 | void test02() |
| 18 | { |
| 19 | std::unordered_set<int>::local_iterator it{}; |
| 20 | VERIFY( std::find(it, it, 0) == it ); |
| 21 | } |
| 22 | |
| 23 | int main() |
| 24 | { |
| 25 | test01(); |
| 26 | test02(); |
| 27 | return 0; |
| 28 | } |