summaryrefslogtreecommitdiffhomepage
path: root/CompilerDriver/cc2/regression-tests/pure2-requires-clauses.cpp2
blob: d4f96f2f35d2614197f3e96fda11f245eddd982b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

X:  <T: type, U: type>
    type
    requires std::is_same_v<T, int>
              && std::is_same_v<U, int>
= {
    operator=: (out this) = { }
}

f:  <T: type, U: type>
    (forward a: int, forward b: int) -> int
    requires std::is_same_v<T, int>
              && std::is_same_v<U, int>
= {
    return a * b;
}

v: <T> const T requires std::same_as<T, i32> = 0;

main: () = {
    _: X<int,int> = ();
    std::cout << f<int,int>(2,5);
}