C++ Logo

std-proposals

Advanced search

Re: is_complete type trait?

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Fri, 12 Nov 2021 12:09:05 -0500
On Fri, Nov 12, 2021 at 12:06 PM Bjorn Reese via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Is std::declval<T>() incomplete if T is incomplete?
>

That question doesn't make sense; types are incomplete, expressions are not
incomplete.
decltype(declval<T>()) is T&&, by definition.
Off the top of my head, I don't think a reference type like *T&&* can
actually ever be "incomplete"; but certainly, if T is incomplete then *T*
would be incomplete.

–Arthur

Received on 2021-11-12 11:09:17