U"This is a UTF-32 string." u8"This is a Unicode Character: \u2018." u"This is a bigger Unicode Character: \u2018." U"This is a Unicode Character: \U00002018." u8R"XXX(I'm a"raw UTF-8" string.)XXX" uR"*(This is a "raw UTF-16" string.)*" UR"(This is a "raw UTF-32"string.)"
! char *pc = nullptr; // OK int *pi = nullptr; // OK bool b = nullptr; // OK. b is false. int i = nullptr; // error ! foo(nullptr); // calls foo(nullptr_t), not foo(int);
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."); }