[libcxx-commits] [libcxx] [libc++] Simplify aligned_storage (PR #114665)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 4 08:01:45 PST 2024


================
@@ -88,9 +71,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
 
 template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
 struct _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_TEMPLATE_VIS aligned_storage {
-  typedef typename __find_pod<__all_types, _Align>::type _Aligner;
-  union type {
-    _Aligner __align;
+  union _ALIGNAS(_Align) type {
----------------
philnik777 wrote:

Yes, this should be an NFC change. TBH I'm not sure why there were ever any specializations. They exist since the initial commit. Maybe you can dig around a bit more internally?

https://github.com/llvm/llvm-project/pull/114665


More information about the libcxx-commits mailing list