// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
// expected-note{{because 'sizeof(char) >= 2' (1 >= 2) evaluated to false}}
struct A ;
static_assert;
static_assert; // expected-error{{constraints not satisfied for class template 'A' [with T = char]}}
// expected-note{{because 'sizeof(char) >= 4' (1 >= 4) evaluated to false}}
constexpr int SizeDiff = sizeof > sizeof ? sizeof - sizeof : sizeof - sizeof;
static_assert;
static_assert; // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = int, U = char[4]]}}
static_assert; // expected-error{{constraints not satisfied for variable template 'SizeDiff' [with T = char, U = int]}}
// expected-note{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}} expected-note{{'sizeof(long long) == 4' (8 == 4) evaluated to false}} expected-note{{'sizeof(int[20]) == 4' (80 == 4) evaluated to false}}
constexpr auto SumSizes = ;
static_assert;
static_assert; // expected-error{{constraints not satisfied for variable template 'SumSizes' [with Ts = <char, long long, int[20]>]}}
concept IsBig = sizeof > 100; // expected-note{{because 'sizeof(int) > 100' (4 > 100) evaluated to false}}
requires IsBig<T> // expected-note{{'int' does not satisfy 'IsBig'}}
using BigPtr = T*;
static_assert; // expected-error{{constraints not satisfied for alias template 'BigPtr' [with T = int]}}}}
requires T::value // expected-note{{because substituted constraint expression is ill-formed: type 'int' cannot be used prior to '::' because it has no members}}
struct S ;
;
static_assert; // expected-error{{constraints not satisfied for class template 'S' [with T = int]}}
static_assert;
;
constexpr auto x = AA<int>; // expected-note{{in instantiation of member function 'AA<int>::foo' requested here}}
constexpr auto x1 = AA<int>; // expected-note{{in instantiation of member function 'AA<int>::foo1' requested here}}
constexpr auto x2 = AA<int>; // expected-note{{in instantiation of member function 'AA<int>::foo2' requested here}}
; // expected-error{{type 'int' cannot be used prior to '::' because it has no members}}
requires B<T>::type // expected-note{{in instantiation of template class 'B<int>' requested here}}
// expected-note@-1{{while substituting template arguments into constraint expression here}}
struct C ;
// expected-error{{atomic constraint must be of type 'bool' (found 'int')}}
struct D ;
static_assert; // expected-note{{while checking constraint satisfaction for template 'C<int>' required here}}
static_assert; // expected-note{{while checking constraint satisfaction for template 'D<int>' required here}}