[libcxx-commits] [PATCH] D81174: [libcxx] Return "real" pointer from array<T, 0>::data.
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 4 09:53:16 PDT 2020
zoecarver created this revision.
zoecarver added reviewers: ldionne, EricWF, miscco.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.
Brings back the "union trick" so that we can stop returning nullptr from data and range methods. This patch adds two overloads of the union `__array_storage_wrapper`. One for trivially copyable types, and one for non-trivially copyable types (where we define a copy constructor).
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5589 bytes
Desc: not available
More information about the libcxx-commits