is inaccurate!”); ! //类级: template<class T> struct Check { static_assert(sizeof(int) <= sizeof(T), "T is not big enough!"); }; ! //⽅方法级: template<class Integral> Integral foo(Integral x, Integral y) { static_assert(std::is_integral<Integral>::value, "foo() parameter must be an integral type."); }