145
|
1 // PR c++/92504
|
|
2 // { dg-do compile { target c++11 } }
|
|
3 // { dg-additional-options "-O2" }
|
|
4
|
|
5 namespace std {
|
|
6 typedef __SIZE_TYPE__ size_t;
|
|
7 typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
|
8 }
|
|
9
|
|
10 struct A {
|
|
11 A ();
|
|
12 A (const A &);
|
|
13 A & operator++ ();
|
|
14 bool operator != (const A &) const;
|
|
15 std::ptrdiff_t operator - (const A &);
|
|
16 A & operator += (std::size_t);
|
|
17 int a;
|
|
18 A & begin ();
|
|
19 A & end (); // { dg-message "declared here" }
|
|
20 };
|
|
21
|
|
22 void
|
|
23 bar ()
|
|
24 {
|
|
25 A a;
|
|
26 #pragma omp for
|
|
27 for (auto b = a; b != a.end; ++b) // { dg-error "invalid use of non-static member function" }
|
|
28 ;
|
|
29 }
|