2

We have this question very well answered What are the new features in C++17?

But I think this particular topic can be covered specially as it is complicated and such questions (about i = i++;) still asked every day (though it is discouraged to do so by rules) so question is: what changed in C++17 related to "sequence points" (better name for this term?) and which particular expressions became valid in the new standard?

There is some information here Undefined behavior and sequence points but answer there was written before C++17 became new standard.

Slava
  • 43,454
  • 1
  • 47
  • 90
  • 4
    New answers (or updates to existing answers) can be posted there, no need to duplicate. – Mat Jan 10 '18 at 15:00
  • This is not a duplicate, I do not think I can technically encourage people to answer old questions. – Slava Jan 10 '18 at 15:02
  • 4
    Why? We need that info in one place, and that question is fine for that. It already has some info on C++17. – Mat Jan 10 '18 at 15:03
  • Why what? Why I cannot encourage? How? I post comment on the old question saying hey somebody summarize what's new in C++17? And I think this big enough and important to have question of it's own – Slava Jan 10 '18 at 15:05
  • 3
    The concept of a "sequence point" was last seen in C++03; it doesn't exist since C++11. – Igor Tandetnik Jan 10 '18 at 15:06
  • @IgorTandetnik is there a new term that I can use instead of "sequenced before"? – Slava Jan 10 '18 at 15:07
  • 1
    @Slava: Things like this is what bounties are for. – Nicol Bolas Jan 10 '18 at 15:10
  • @NicolBolas my bounty will not express that I want to cover specific topic – Slava Jan 10 '18 at 15:11
  • Sequenced-before relationship. C++17 made the order of evaluation of subexpressions deterministic in certain limited cases, where they were unsequenced before; see [here](http://en.cppreference.com/w/cpp/language/eval_order) the parts marked "since C++17". That's the only change I know of related to order of evaluation. – Igor Tandetnik Jan 10 '18 at 15:12
  • 2
    @Slava: Yes, it can. All you have to do is say, "I'm looking for C++17 information." Bounties have a text box where you can type what you're looking for. – Nicol Bolas Jan 10 '18 at 15:12
  • @NicolBolas I do not quite understand why covering new C++17 features in special question is fine (it can be covered in old question as well) but this one is not. What is the difference? – Slava Jan 10 '18 at 15:13
  • 3
    @Slava: Because your question is the *exact same question* as the sequence point one, except with "for C++17" tacked onto the end. Most questions covering C++17 features aren't exactly identical to other questions. – Nicol Bolas Jan 10 '18 at 15:15
  • @NicolBolas question - " What are the new features in C++17" what is different in this question except with "C++17" tacked onto the end? – Slava Jan 10 '18 at 15:16
  • 4
    I'm voting to close this question as off-topic because it belongs on meta. – Barry Jan 10 '18 at 15:19
  • @NicolBolas here is another reason - old questions with C++17 information based on coming standard and on ongoing discussion (maybe inaccurate and outdated). Determine if it is requires additional reader attention and not simple due to complexity of the topic. Here answers clearly should be based on actual standard. – Slava Jan 10 '18 at 15:25

0 Answers0