struct C {
C(bool);
constexpr C(int) {}
constexpr C& operator=(int)&& { return *this; }
constexpr operator int() const { return 22; }
};
static constexpr int x = 33;
static constexpr int y = 44;
struct A {
template<int, int> static bool f(int);
//static constexpr int f = 77;
int g(bool = f<55, C(x) = 66>(y));
};
MSVC and icc accept (with A::g a function of 1 argument); gcc and clang reject. If f is changed to the non-template static data member (s.t. A::g is now a function of 2 arguments), everyone accepts.
If f as a static member function template is moved to after g, all reject; if it is a non-template static data member all except icc accept.