C++ Logo

std-proposals

Advanced search

Re: is_complete type trait?

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Fri, 12 Nov 2021 12:26:06 +0200
On Fri, 12 Nov 2021 at 11:47, Giuseppe D'Angelo via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> Hi,
>
> On 12/11/2021 10:39, Bjorn Reese via Std-Proposals wrote:
> >> Yes, this is why I asked if there have been any proposals, as they would
> >> have to address such topics.
> > Furthermore, many existing type traits requires complete types, so the
> > standard C++ library implementations must check for completeness today.
>
> Those type traits have completeness as a _precondition_, meaning that if
> you violate it, the behaviour is undefined.

Yep, but if you evaluate such a trait in a mandatory-constant
expression evaluation context,
that UB needs to render the program ill-formed, like other constexpr UB does. :P

Received on 2021-11-12 04:26:19