brintos

brintos / llvm-project-archived public Read only

0
0
Text · 550 B · 1a9bf1d Raw
41 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3// expected-no-diagnostics4 5void check(int&) = delete;6void check(int const&) { }7 8template <typename>9struct A {10    union {11        int b;12    };13    struct {14      int c;15    };16    union {17      struct {18        union {19          struct {20            struct {21              int d;22            };23          };24        };25      };26    };27    int e;28    void foo() const {29      check(b);30      check(c);31      check(d);32      check(d);33      check(e);34    }35};36 37int main(){38    A<int> a;39    a.foo();40}41