repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
c++: prev declared hidden tmpl friend inst [PR112288]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
class-deduction-aggr4.C
blob
0debbb2443f85185313c9eb0821df9528b13f0ec
1
// Other testcases from P2082R1
2
// { dg-do compile { target c++20 } }
3
4
template <typename T>
5
struct X {};
6
int main() {
7
X<int> x1;
8
X x2 {x1};
9
}
10
11
template <typename T, int N>
12
struct A {
13
T array[N];
14
};
15
A a1 = {{1, 2, 3}}; // should deduce A<int, 3>
16
A a2 = {"meow"}; // should deduce A<const char, 5>
17
18
template <typename T>
19
struct B {
20
T array[2];
21
};
22
B b = {0, 1};
23
24
template<typename... T>
25
struct C : T... {};
26
C c = {
27
[]{ return 1; },
28
[]{ return 2; }
29
};