You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Despite the title being "Deleting a Pointer to an Incomplete Type Should be Ill-formed", P3144R2 only invalidated deleting pointers to incomplete class types.
So, currently the following definition is supposed to be well-formed. But Clang currently rejects it (Godbolt link).
enum E {
zero = decltype(deletestatic_cast<E*>(nullptr), 0){} // E is incomplete here
};
Not sure whether the standard or Clang should be fixed. As it's already very tricky to attempt to delete a pointer to an incomplete enumeration type, a CWG issue might be wanted to reject such delete-expressions.
Edit: CWG2925 was closed as NAD, so presumably Clang should be fixed.