blob: 45da11162dbdbebd6ab6a7804da4572832d0034c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// PR37314 rejects-valid, from w.doeringer
template <typename T>
struct A {
typedef __PTRDIFF_TYPE__ difference_type;
struct B {
typedef typename A<T>::difference_type difference_type;
difference_type operator-(B const&) const;
T t;
};
};
//
template <typename T>
typename A<T>::B::difference_type A<T>::B::operator-(B const&) const {
return -1;
}
//
int main() {
A<int>::B i;
++i.t;
return 0;
}
|