blob: f3488ea07541b83d9f1a6d1af82a19964cd2911d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// { dg-do compile { target c++11 } }
struct iterator;
struct const_iterator {
const_iterator(const iterator&);
bool operator==(const const_iterator &ci) const = delete;
};
struct iterator {
bool operator==(const const_iterator &ci) const {
return ci == *this; // { dg-error "deleted" "" { target c++17_down } }
} // { dg-warning "reversed" "" { target c++20 } .-1 }
};
|