C++ Logo

std-discussion

Advanced search

Re: confusing description of std::conjunction

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Tue, 29 Apr 2025 19:47:11 +0200
On 29/04/2025 19.37, Vladimir Grigoriev via Std-Discussion wrote:
> In the C++20 there is written relative to std::conjunction
>
> 5 The specialization conjunction has a public and unambiguous base that is either
> (5.1) — the first type Bi in the list true_type, B1, . . . , BN for which bool(Bi::value) is false, or
> (5.2) — if there is no such Bi , the last type in the list.
>
> But in my point of view there is nothing said what will be if the template argument list is empty.

There is:

The 5.1 list is just "true_type" in that case, and since there is no Bi (at all),
we take the last type in the list (which is true_type) per 5.2, and that's the result.

Jens

Received on 2025-04-29 17:47:16