1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
// { dg-do assemble } // GROUPS passed overloading enum bar {}; void operator+ (int, int);// { dg-error "" } .* void operator+ (bar&, int); template <class T> void operator+ (int b, T& t) { return b; } void operator+ (int, bar&); template <class T> class foo { public: friend void operator+ <> (int, T&); }; class baz; class foo<int>; class foo<baz>;