Zero-sized types are a GCC extension, also supported by Clang.
It's already invalid to delete a void pointer or a pointer-to-incomplete,
so in theory we don't need any special code to catch those cases; but
for some reason Clang accepts both constructs with nothing more than
a warning (which is suppressed in system headers), so that's why the
static_assert isn't entirely removed.
In ranges::begin/end, check sizeof >= 0 instead of sizeof != 0,
so as to permit zero-sized types while still disallowing incomplete
types.
I would like a comment explaining why sizeof(_Tp) == 0 is possible.
Looking at the number of sizeof(_Tp) >= 0 in the code, would it make sense to add a type trait __is_complete and add the explanation there?