C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposal: -Wverbose-style

From: Magnus Fromreide <magfr_at_[hidden]>
Date: Sat, 18 Oct 2025 11:02:13 +0200
On Thu, Oct 16, 2025 at 12:54:41PM +0100, Frederick Virchanza Gotham via Std-Proposals wrote:
>
> Just by the way, when I'm checking for 'true', I do:
>
> if ( flag )
>
> And when I'm checking for 'false', I do:
>
> if ( false == flag )
>

If I want to really make it visible that I check for false I tend to write
it as

    if (not flag)

using the alternate keyword for the ! operator.

Received on 2025-10-18 09:02:18