C++ 具名要求:字面类型(LiteralType)(C++11 起) 指明一個類型為字面類型。字面類型是constexpr變數擁有的類型,且能通過constexpr函數構造、操作及返回它們。 注意:標準中並沒有定義具有這個名字的具名要求。這是核心語言所定義的一種類型類別。將它作為具名要求包含於此只是為了保持一致性。
operator""sv(constwchar_t*str,std::size_tlen)noexcept; (5)(since C++17) Forms a string view of a character literal. 1)Returnsstd::string_view{str, len}. 2)Returnsstd::u8string_view{str, len}. 3)Returnsstd::u16string_view{str, len}. ...
operator== 是一种等价关系 (具名要求) LessThanComparable可小于比较 operator< 是一种严格弱序关系 (具名要求) Swappable可交换 (C++11) 可用无限定的非成员函数调用 swap() 进行交换的类型 (具名要求) ValueSwappable可交换值 (C++11) 解引用为某种可交换 (Swappable) 类型的老式迭代器 (Legacy...
It is unspecified whether non-ordinary string literals are allowed in these contexts, except that a literal operator name must use an ordinary string literal(since C++11). (until C++26) Only ordinary string literals are allowed in these contexts. Each universal character name and each simple ...
注意:为了防止混淆,一般来说,本文将value categories翻译为值类型,type翻译为型别。 值类型(value categories) 每一个C++表达式(带有运算对象[operand]的运算符、字面值[literal]、变量名等)都是由两个独立的属性(properties) ——— 型别[type]和值类型[value categories] ——— 来描述[characterized]的。每一...
primary-expression:literalthis(expression)id-expressionid-expression:unqualified-idqualified-idunqualified-...
a string literal, such as "Hello, world!"; (特别注意,C++规定字符串是左值) a cast expression to lvalue reference type, such as static_cast<int&>(x); a function call or an overloaded operator expression of rvalue reference to function return type; ...
operator""h (C++14) Un literalstd::chrono::durationque representa horas. (función) operator""min (C++14) Un literalstd::chrono::durationque representa minutos. (función) operator""s (C++14) Un literalstd::chrono::durationque representa segundos. ...
Macro where TAO_PEGTL_STRING( "foo" ) yields string< 'f', 'o', 'o' >. The argument must be a string literal. Works for strings up to 512 bytes of length (excluding trailing '\0'). Strings may contain embedded '\0'.three< C >Succeeds when the input contains at least three ...
Removing mixed wide string literal concatenation P2201R1 Yes Yes Yes Yes Yes Yes Yes Explicit object member functions (deducing this) (FTM)* P0847R7 14 1819* 19.32*(partial)*19.43* 6.3 22.5 auto(x) and auto{x} (FTM)* P0849R8 12 15 14.0.3* 6.4 2022.2 23.3 ...