The compiler requirement enforcement should be done like this example. It can also be done in cmake, but I prefer this approach in case someone pulls headers without the cmake.
https://github.com/bemanproject/scope/blob/main/include/beman/scope/scope.hpp#L12-L15