// RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
concept C1 = sizeof == 1;
// expected-note@-1 2{{because 'sizeof(short) == 1' (2 == 1) evaluated to false}}
// expected-note@-2 {{because 'sizeof(int) == 1' (4 == 1) evaluated to false}}
// expected-note {{because 'int' does not satisfy 'C1'}}
using A = T;
using a1 = A<int>; // expected-error {{constraints not satisfied for alias template 'A' [with T = int]}}
using a2 = A<char>;
concept C2 = sizeof == 2;
// expected-note@-1 {{because 'sizeof(char) == 2' (1 == 2) evaluated to false}}
// expected-note@-1 2{{because 'short' does not satisfy 'C1'}}
// expected-note@-2 {{because 'char' does not satisfy 'C2'}}
using B = T1;
using b1 = B<char, short>;
using b2 = B<char, char>; // expected-error {{constraints not satisfied for alias template 'B' [with T1 = char, T2 = char]}}
using b3 = B<short, short>; // expected-error {{constraints not satisfied for alias template 'B' [with T1 = short, T2 = short]}}
using b4 = B<short, char>; // expected-error {{constraints not satisfied for alias template 'B' [with T1 = short, T2 = char]}}
concept C3 = == 12;
// expected-note@-1 {{because 'sizeof(char[11]) == 12' (11 == 12) evaluated to false}}
// expected-note@-2 {{because 'sizeof(char[10]) == 12' (10 == 12) evaluated to false}}
// expected-note@-3 3{{because 'sizeof(int) == 12' (4 == 12) evaluated to false}}
// expected-note@-4 6{{because 'sizeof(short) == 12' (2 == 12) evaluated to false}}
// expected-note@-1 {{because 'char[11]' does not satisfy 'C3'}}
// expected-note@-2 {{because 'char[10]' does not satisfy 'C3'}}
using C = T2;
using c1 = C<char, int, short>;
using c2 = C<char, char, char>;
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[11], T3 = char[10]]}}
using c3 = C<char, char, char>;
// expected-error@-1 {{constraints not satisfied for alias template 'C' [with T1 = char[12], T2 = char[12], T3 = char[10]]}}
// expected-note@-1 {{because 'int' does not satisfy 'C3'}}
// expected-note@-2 2{{and 'int' does not satisfy 'C3'}}
// expected-note@-3 {{because 'short' does not satisfy 'C3'}}
// expected-note@-4 5{{and 'short' does not satisfy 'C3'}}
using D = int;
using d1 = D<char, int, short>;
using d2 = D<int, int, int>;
// expected-error@-1 {{constraints not satisfied for alias template 'D' [with Ts = <int, int, int>}}
using d3 = D<short, short, short, short, short, short>;
// expected-error@-1 {{constraints not satisfied for alias template 'D' [with Ts = <short, short, short, short, short, short>}}
concept C4 = sizeof == 4;
// expected-note@-1 3{{because 'sizeof(char) == 4' (1 == 4) evaluated to false}}
// expected-note@-1 2{{because 'char' does not satisfy 'C4'}}
// expected-note@-2 {{and 'char' does not satisfy 'C4'}}
using E = int;
using e1 = E<int>;
using e2 = E<char, int>; // expected-error {{constraints not satisfied for alias template 'E' [with Ts = <char, int>]}}
using e3 = E<char, char>; // expected-error {{constraints not satisfied for alias template 'E' [with Ts = <char, char>]}}
using e4 = E<>;
constexpr bool is_same_v = false;
constexpr bool is_same_v<T, T> = true;
concept Same = is_same_v<T, U>; // expected-note {{because 'is_same_v<long, int>' evaluated to false}}
// expected-note {{because 'Same<long, int>' evaluated to false}}
using F = T;
using f1 = F<int>;
using f2 = F<long>; // expected-error {{constraints not satisfied for alias template 'F' [with T = long]}}
concept OneOf = ;
// expected-note@-1 2{{because 'is_same_v<char, char[1]>' evaluated to false}}
// expected-note@-2 2{{and 'is_same_v<char, char[2]>' evaluated to false}}
// expected-note@-3 {{because 'is_same_v<short, int>' evaluated to false}}
// expected-note@-4 {{and 'is_same_v<short, long>' evaluated to false}}
// expected-note@-5 {{and 'is_same_v<short, char>' evaluated to false}}
// expected-note@-6 3{{because 'is_same_v<int, char[1]>' evaluated to false}}
// expected-note@-7 3{{and 'is_same_v<int, char[2]>' evaluated to false}}
// expected-note@-8 2{{because 'is_same_v<std::nullptr_t, char>' evaluated to false}}
// expected-note@-9 2{{and 'is_same_v<std::nullptr_t, int>' evaluated to false}}
T, OneOf<int, long, char> U>
// expected-note@-1 2{{because 'OneOf<char, char[1], char[2]>' evaluated to false}}
// expected-note@-2 {{because 'OneOf<short, int, long, char>' evaluated to false}}
using G = T;
using g1 = G<char, int>;
using g2 = G<char, int>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = int]}}
using g3 = G<char, short>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char[1], U = short]}}
using g4 = G<char, short>; // expected-error{{constraints not satisfied for alias template 'G' [with T = char, U = short]}}
... Ts>
// expected-note@-1 2{{because 'OneOf<int, char[1], char[2]>' evaluated to false}}
// expected-note@-2 {{and 'OneOf<int, char[1], char[2]>' evaluated to false}}
using H = int;
using h1 = H<char, int>;
// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = <char[1], int>]}}
using h2 = H<int, int>;
// expected-error@-1 {{constraints not satisfied for alias template 'H' [with Ts = <int, int>]}}
using h3 = H<char, char>;
// expected-note@-1 {{because 'OneOf<decltype(nullptr), char, int>' evaluated to false}}
using I = int;
using i1 = I<1>;
using i2 = I<'a'>;
using i3 = I<nullptr>;
// expected-error@-1 {{constraints not satisfied for alias template 'I' [with x = nullptr]}}
// expected-note@-1 {{because 'OneOf<decltype(nullptr), char, int>' evaluated to false}}
using J = int;
using j1 = J<1, 'b'>;
using j2 = J<'a', nullptr>;
// expected-error@-1 {{constraints not satisfied for alias template 'J' [with x = <'a', nullptr>]}}
// expected-error@-1 {{constrained placeholder types other than simple 'auto' on non-type template parameters not supported yet}}
using K = int;