What is run first inside a cout statement? (C++17)

后端 未结 2 590
时光取名叫无心
时光取名叫无心 2020-12-21 19:58

Say for example I have a long statement like

cout << findCurrent() << \",\" << findLowest() << \",\" << findHighest() << \

2条回答
  •  眼角桃花
    2020-12-21 20:20

    Before C++17, the order of evaluation is unspecified.

    As of C++17, it's required to be evaluated left-to-right. See M.M's answer for standard quotation.

提交回复
热议问题