// PR c++/23789 template struct X { template X< (W+(W&&W) > 1 ? W+(W&&W) : 1)+1> operator + (const X&) const; }; template void foo() { X<6> A,B; A + B; }