1 // PR c++/23789 2 3 template <int W> struct X { 4 template <int W2> 5 X< (W+(W&&W) > 1 ? W+(W&&W) : 1)+1> 6 operator + (const X<W2>&) const; 7 }; 8 foo()9 template <int dummy> void foo() 10 { 11 X<6> A,B; 12 A + B; 13 } 14