I’ve always been under the impression that for any comparison statement, i.e. X == Y or X != Y is the format, and you chain statements together with && or ||.
Is there not some way to write X == (Y || Z) instead of X == Y || X == Z?
Edit: Since it has been established that this is not possible to do cleanly, how else could it be done?
proof of compilation. Xeo also observes that
std::any_of,std::all_ofandstd::none_ofmay have been useful, depending on your actual needs and desires.