Skip to content

为什么123页4.1.3节的语句结果是未定义的? #61

Description

@movement-wang

cout << i << " " << ++i << endl;
虽然<<被重载了,但重载不改变优先级,++的优先级比<<高,为什么不先计算++,再<<?为什么输出是未定义的?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions