libstdc++-v3/testsuite/23_containers/map/debug/112477.cc
raw| 1 | // { dg-do run { target c++11 } } |
| 2 | // { dg-require-debug-mode "" } |
| 3 | |
| 4 | // PR libstdc++/112477 |
| 5 | |
| 6 | #include <map> |
| 7 | |
| 8 | int main() |
| 9 | { |
| 10 | using M = std::map<int, int>; |
| 11 | using I = M::iterator; |
| 12 | |
| 13 | M map{ {1, 1}, {2, 2} }; |
| 14 | |
| 15 | I it1 = map.begin(); |
| 16 | it1 = I{}; |
| 17 | |
| 18 | I it2{}; |
| 19 | (void)(it1 == it2); |
| 20 | } |