HomePhabricator

Fix initialization of array<const T, 0> with GCC.

Description

Fix initialization of array<const T, 0> with GCC.

Previously, when handling zero-sized array of const objects we
used a const version of aligned_storage_t, which is not an array type.
However, GCC complains about initialization of the form: array<const T, 0> arr = {};

This patch fixes that bug by making the dummy object used to represent
the zero-sized array an array itself. This avoids GCC's complaints
about the uninitialized const member.

Details

Committed
EricWFFeb 4 2018, 12:02 AM
Parents
rL324193: Mark LWG 3014 as complete. No code changes needed
Branches
Unknown
Tags
Unknown