blob: 53855a9ef9ead0ccb63a6c18c1ea3d2bc264f52e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// PR c++/94149 - make __is_constructible work with paren-init of aggrs.
// { dg-do compile { target c++2a } }
struct nonaggr {
nonaggr() {}
int i;
int j;
};
struct aggr {
int i;
int j;
};
static_assert(__is_constructible(aggr, int, int));
static_assert(__is_constructible(aggr, int));
static_assert(!__is_constructible(nonaggr, int, int));
using T = aggr[2];
static_assert(__is_constructible(T, aggr));
static_assert(__is_constructible(T, aggr, aggr));
using N = nonaggr[2];
static_assert(__is_constructible(N, nonaggr));
static_assert(__is_constructible(N, nonaggr, nonaggr));
|