C++ Logo

std-proposals

Advanced search

[std-proposals] Unary operator | (absolute value of)

From: Rik van der Brugghen <potideluxe_at_[hidden]>
Date: Thu, 23 Nov 2023 23:43:55 +0100
Hi.

Maybe suggested before, but would be great with

  a = |b; // a = abs (b)

That's it, exactly same semantic behaviour (precedence and all that stuff)
as ~b.

Best regards,
Rik van der Brugghen
Stockholm

Received on 2023-11-23 22:44:08