blob: d6949dc7005ea05b68a28d9a302d8f509bd1a259 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// PR c++/115476
// { dg-do compile { target c++11 } }
struct X;
static_assert(__has_unique_object_representations(X), ""); // { dg-error "invalid use of incomplete type" }
static_assert(__has_unique_object_representations(X[]), ""); // { dg-error "invalid use of incomplete type" }
static_assert(__has_unique_object_representations(X[1]), ""); // { dg-error "invalid use of incomplete type" }
static_assert(__has_unique_object_representations(X[][1]), ""); // { dg-error "invalid use of incomplete type" }
struct X {
int x;
};
static_assert(__has_unique_object_representations(X), "");
static_assert(__has_unique_object_representations(X[]), "");
static_assert(__has_unique_object_representations(X[1]), "");
static_assert(__has_unique_object_representations(X[][1]), "");
|