[libcxx-commits] [PATCH] D122598: [libcxx] avoid using anonymous struct with base classes (fixes gcc-12)

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 28 20:23:21 PDT 2022


philnik added a comment.

Why not make it something like

  template <class CharT>
  struct short_size {
      char __padding[sizeof(CharT) - 1];
      unsigned char __size_;
  };

? That would eliminate the need for `__padded` all together. This of course requires another extension, but makes the code a lot simpler.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122598/new/

https://reviews.llvm.org/D122598



More information about the libcxx-commits mailing list