每个C++ 表达式(带有操作数的操作符、字面量、变量名等)可按照两种独立的特性加以辨别:类型 和值类别 (value category)。每个表达式都具有某种非引用类型,且每个表达式只属于三种基本值类别中的一种:纯右值 (prvalue)、亡值(xvalue)、左值(lvalue)。 泛左值 (glvalue)(“泛化 (generalized)”的左
Each C++expression(an operator with its operands, a literal, a variable name, etc.) is characterized by two independent properties: atypeand avalue category. Each expression has some non-reference type, and each expression belongs to exactly one of the three primary value categories:prvalue,xva...
An rvalue may be used to initialize a const lvalue reference, in which case the lifetime of the object identified by the rvalue is extended until the scope of the reference ends. An rvalue may be used to initialize an rvalue reference, in which case the lifetime of the object identifie...
Any expression in parentheses is also classified as a primary expression: this guarantees that the parentheses have higher precedence than any operator. Parentheses preserve value, type, and value category. Literals Literals are the tokens of a C++ program that represent constant values embedded in th...
Thevalue categoryof the cast expression is always non-lvalue. Notes Becauseconst,volatile,restrict, and_Atomicqualifiers have effect onlvaluesonly, a cast to a cvr-qualified or atomic type is exactly equivalent to the cast to the corresponding unqualified type. ...
Indexing 'https://en.cppreference.com/w/cpp/error/error_code/value' (depth 3)... Indexing 'https://en.cppreference.com/w/cpp/error/error_condition/hash' (depth 3)... Indexing 'https://en.cppreference.com/w/cpp/error/exception/operator%3D' (depth 3)... Indexing 'https://en.cpp...
constAws::Map<Aws::String,RealTimeContactAnalysisCategoryDetails> &GetMatchedDetails() const boolMatchedDetailsHasBeenSet() const template<typename MatchedDetailsT = Aws::Map<Aws::String, RealTimeContactAnalysisCategoryDetails>> voidSetMatchedDetails(MatchedDetailsT &&value) ...
AWS_CONNECT_APIRealTimeContactAnalysisCategoryDetails& Aws::Connect::Model::RealTimeContactAnalysisCategoryDetails::operator=(Aws::Utils::Json::JsonViewjsonValue) ◆PointsOfInterestHasBeenSet() bool Aws::Connect::Model::RealTimeContactAnalysisCategoryDetails::PointsOfInterestHasBeenSet()const ...
forwards a function argument and use the type template argument to preserve its value category (function template) forward_like (C++23) forwards a function argument as if casting it to the value category and constness of the expression of specified type template argument ...
Otherwise, the type or value category of the operand is changed by integral promotion or lvalue-to-rvalue, array-to-pointer, function-to-pointer, or user-defined conversion. For example, char is converted to int , and non-generic captureless lambda expression is converted to function pointer...