Code often has a ready predicate and needs the opposite check. Writing the negated twin by hand duplicates logic; a small wrapper object that stores the original predicate and flips its answer solves it once for every predicate. std::not_fn is the library version of exactly this.
Implement not_functor(f): it takes a predicate object and returns a new one answering the opposite. not_functor(IsEven{})(3) == true. Build the wrapper class yourself — no lambdas, no std.
The wrapper stores a copy of the predicate; its operator() calls the stored one and applies !.
A helper function template deduces F, so callers never spell the wrapper type.
Hit Submit (or ⌘/Ctrl + ↵) — test results will show up here.