view gcc/testsuite/g++.dg/lookup/pr80891-3.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR c++/80891 part 3
// We were failing to mark OVERLOADS held in template definitions as
// immutable in non-call contexts.

namespace std {
  int endl();
}

using std::endl;

template <class RealType> void test_spots(RealType)
{
  using namespace std;
  RealType a;
  a << endl;
}

template <typename T>
void operator<< (T, int (&)());

struct Q {};
void test_maintest_method()
{
  Q q;
  test_spots(q);
}