C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fold expression contains 'if constexpr'

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Sun, 4 Dec 2022 23:13:45 +0000
On Sun, Dec 4, 2022 at 10:53 PM Thiago Macieira via Std-Proposals
<std-proposals_at_[hidden]> wrote:

> if constexpr ((requires{ get<Types>(p)->Method(a); } || ...))
> return tailcall(a...);


Note that my original function has "auto" as the return type, and so
the "if else ladder" with the 'constexpr' keyword was able to pick out
the correct return type.

Received on 2022-12-04 23:13:54