Temporary materialization occurs in the following situations: m // member access expects glvalue as of C++17 // S() prvalue is converted to xvalue Zero_init ( ) : val ( static_cast ( 0 ) ) int i = S ( ). the controlling expression of the switch statement ( T is any integral or enumeration type).integral constant expression, where a literal class is used ( T is any integral or unscoped enumeration type, the selected user-defined conversion function must be constexpr).the argument of the delete-expression ( T is any object pointer type).Note that explicit conversion functions are not considered, even though they are considered in contextual conversions to bool. Such expression e is said to be contextually implicitly converted to the specified type T. there is exactly one type T among the allowable types such that E has non-explicit conversion functions whose return types are (possibly cv-qualified) T or reference to (possibly cv-qualified) T, and.E has a single non-explicit (since C++11) user-defined conversion function to an allowable type.In the following contexts, a context-specific type T is expected, and the expression e of class type E is only allowed if the expression in an explicit specifier.the expression in a noexcept specifier.the predicate in a static_assert declaration.the first operand of the conditional operator ?:. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |