https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109114

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
But this works:
```
struct a
{
  a() = delete;
  a(const a&) = default;
  int x;
  char y;
};
struct b
{
  b() = delete;
  b(const b&) = default;
  char y;
};
template <typename ...T>
struct Callables : T ... {
  Callables(T ...t) : T(t) ... {}
};

void f() {
  static_assert(sizeof(Callables<a,b>) == 12);
}
```

For both GCC and LLVM. The thing is the default constructor is not only deleted
but it should also be private .... Once you do that like:
```
struct a
{
  a() = delete;
  a(const a&) = default;
private:
  int x;
  char y;
};
struct b
{
  b() = delete;
  b(const b&) = default;
private:
  char y1;
};
template <typename ...T>
struct Callables : T ... {
  Callables(T ...t) : T(t) ... {}
};

void f() {
  static_assert(sizeof(Callables<a,b>) == 8);
}
```
It becomes 8.

Reply via email to