Debian Codegraph @

gcc/testsuite/g++.dg/lookup/pr80891-3.C

raw
1 // PR c++/80891 part 3
2 // We were failing to mark OVERLOADS held in template definitions as
3 // immutable in non-call contexts.
4
5 namespace std {
6 int endl();
7 }
8
9 using std::endl;
10
11 template <class RealType> void test_spots(RealType)
12 {
13 using namespace std;
14 RealType a;
15 a << endl;
16 }
17
18 template <typename T>
19 void operator<< (T, int (&)());
20
21 struct Q {};
22 void test_maintest_method()
23 {
24 Q q;
25 test_spots(q);
26 }