// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s template requires (sizeof(T) >= 4) // expected-note@-1{{similar constraint expressions not considered equivalent}} bool a = false; // expected-note{{template is declared here}} template requires (sizeof(T) >= 4 && sizeof(T) <= 10) // expected-note@-1{{similar constraint expression here}} bool a = true; // expected-error{{variable template partial specialization is not more specialized than the primary template}} template concept C1 = sizeof(T) >= 4; template requires C1 bool b = false; template requires (C1 && sizeof(T) <= 10) bool b = true; template concept C2 = sizeof(T) > 1 && sizeof(T) <= 8; template bool c = false; template requires C1 bool c = true; template bool d = false; template bool d = true; // expected-error{{variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}} template requires C1 bool e = false; template bool e = true; // expected-error{{variable template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list}} template constexpr int f = 1; template requires C1 && C2 constexpr int f = 2; template requires C1 || C2 constexpr int f = 3; static_assert(f == 2); static_assert(f == 3); static_assert(f == 1);