From ef5da501f7e8734657cb7c70dfe970013bf4bea9 Mon Sep 17 00:00:00 2001 From: DH Date: Thu, 16 Oct 2025 11:42:06 +0300 Subject: [PATCH] rx/EnumBitSet: add free operator~ --- rx/include/rx/EnumBitSet.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rx/include/rx/EnumBitSet.hpp b/rx/include/rx/EnumBitSet.hpp index e98e6dba6..6a42eebb2 100644 --- a/rx/include/rx/EnumBitSet.hpp +++ b/rx/include/rx/EnumBitSet.hpp @@ -204,6 +204,10 @@ template [[deprecated("Use toBitSet(bit)")]] constexpr EnumBitSet operator+(T bit) { return EnumBitSet(bit); } +template +constexpr detail::InvertedEnumBitSet operator~(T bit) { + return ~toBitSet(bit); +} // Binary '+' operator: bitset union template requires(std::is_constructible_v, U>)