Skip to content

3.3 中 原始字面量不一定是右值 #102

Closed
@cathaysia

Description

@cathaysia

实际描述

  • 文件路径:例如,book/zh-cn/03-runtime.md
  • 原文段落:
运算表达式产生的临时变量、 原始字面量、Lambda 表达式都属于纯右值。

原文表意不准确:

原始字面量并不一定是右值,比如 字符字面量,字符字面量可以被取地址,是一个左值。

参见:https://en.cppreference.com/w/cpp/language/value_category

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions