You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
550 B
41 lines
550 B
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
// expected-no-diagnostics
|
|
|
|
void check(int&) = delete;
|
|
void check(int const&) { }
|
|
|
|
template <typename>
|
|
struct A {
|
|
union {
|
|
int b;
|
|
};
|
|
struct {
|
|
int c;
|
|
};
|
|
union {
|
|
struct {
|
|
union {
|
|
struct {
|
|
struct {
|
|
int d;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
int e;
|
|
void foo() const {
|
|
check(b);
|
|
check(c);
|
|
check(d);
|
|
check(d);
|
|
check(e);
|
|
}
|
|
};
|
|
|
|
int main(){
|
|
A<int> a;
|
|
a.foo();
|
|
}
|