gcc/testsuite/g++.dg/init/ctor6.C
raw| 1 | // PR c++/21340 |
| 2 | |
| 3 | struct Base{}; |
| 4 | struct Iterator : virtual Base {}; |
| 5 | bool operator==(const Iterator&, const Iterator&); |
| 6 | struct IteratorI : Iterator {}; |
| 7 | struct Obj |
| 8 | { |
| 9 | bool operator==(const Obj&) const; |
| 10 | }; |
| 11 | template <int>bool dummy() |
| 12 | { |
| 13 | Obj lhs, rhs; |
| 14 | return lhs == rhs; |
| 15 | } |
| 16 | int |
| 17 | main(int argc, char** argv) |
| 18 | { |
| 19 | IteratorI* it2 = new IteratorI(); |
| 20 | } |