https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80858

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #7)
> <source>:5:8:   required from here
> /opt/compiler-explorer/gcc-13.2.0/include/c++/13.2.0/bits/unique_ptr.h:97:23:
> error: invalid application of 'sizeof' to incomplete type 'A'
>    97 |         static_assert(sizeof(_Tp)>0,
>       |                       ^~~~~~~~~~~

Separately, I have a patch to improve the static assertion here so that it
actually prints the static_assert's string literal, instead of giving an error
in the boolean condition. But that's specific to the unique_ptr case, and
doesn't help the comment 0 and comment 4 examples.

Reply via email to