[all-commits] [llvm/llvm-project] 7c6949: [libc++] Simplify aligned_storage (#114665)

Nikolas Klauser via All-commits all-commits at lists.llvm.org
Mon Nov 4 08:49:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c69491e486a93e8b86a390a0d5d580eeca7f7d5
      https://github.com/llvm/llvm-project/commit/7c69491e486a93e8b86a390a0d5d580eeca7f7d5
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M libcxx/include/__type_traits/aligned_storage.h

  Log Message:
  -----------
  [libc++] Simplify aligned_storage (#114665)

The main template of `aligned_storage` is only ever used when we have
extremely overaligned types (> 16384), so we effectively only ever use
the specializations currently. This means that we only instantiate the
main template for overaligned types. Instead of doing this dance, we can
just define the main template to use `_ALIGNAS`, just like the
specializations. This makes the implementation of `aligned_storage`
significantly less confusing.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list