view gcc/testsuite/g++.dg/cpp0x/gen-attrs-41.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++/45267
// { dg-do compile { target c++11 } }
// { dg-options "-O" }

template<typename T> struct Vector {
  Vector(long long x);
  inline Vector<T> operator<< [[gnu::always_inline]] (int x) const;
};
long long bar (long long);
template<> inline Vector<int> Vector<int>::operator<<(int x) const {
  return bar(x);
}
bool b;
int main() {
  Vector<int> a(1);
  if ((a << 2), b) {
    a << 2;
    throw 1;
  }
}