There is not, because it's essentially a one-liner and the <type_traits>
should be as small as possible.
template <typename T> using static_not = std::integral_constant<bool, !T::value>;
Usage:
static_not<my_static_bool>
This is the correct way because the standard always says "false_type
or derived from such", so you can't depend on being equal to std::false_type
. I usually relax that to "having a constexpr boolean ::value
property" because I don't use tag dispatching.