// PR c++/107461 // { dg-do compile { target c++11 } } template constexpr T min(T t0, T t1) { return t0 < t1 ? t0 : t1; } template struct Matrix; template Matrix operator+(Matrix const& lhs, Matrix const& rhs); // #1 template struct Matrix { template friend Matrix operator+(Matrix const& lhs, Matrix const& rhs); // #2 }; int main() { Matrix<1> a; a+a; }