there are 2 types, logical and bitwise. Logical is the whole value, bitwise is per bit. 1234 is just true (and collapses to 1 if used thusly), logically, because its not zero. but bitwise not of 1234 is some totally different value.
#include <iostream>
#include <concepts>
enumclass A { zero = 0, one = 1 };
enum B : short { neg = -10, pos = +10 };
enum C : unsignedlonglong { ccc = 5 };
int main()
{
A a = A::zero ; // scoped enumeration
// !a ; // *** error *** there is no no operator !
// ~a ; // *** error *** there is no no operator ~
B b = neg ; // unscoped enumeration
autoconst x = ~b ; // integral promotion B => short => int
static_assert( std::same_as< decltype(~b), int > ) ; // ~b is an int
static_assert( std::same_as< decltype(!b), bool > ) ; // !b is a bool (! is applied to the promoted int value)
C c = ccc ; // unscoped enumeration
autoconst y = ~c ; // integral promotion C => unsigned long long
static_assert( std::same_as< decltype(~c), unsignedlonglong > ) ; // ~c is an unsigned long long
static_assert( std::same_as< decltype(!c), bool > ) ; // !b is a bool (! is applied to the promoted unsigned long long value)
}