From 03fc3a359be8164e37f05deb27a5cfb21bf85fc6 Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 10 Jun 2021 11:27:17 -0700 Subject: [PATCH] Closes #1791 --- CppCoreGuidelines.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index cf96584..01fe26b 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -11609,9 +11609,8 @@ C++17 tightens up the rules for the order of evaluation, but the order of evalua int i = 0; f(++i, ++i); -The call will most likely be `f(0, 1)` or `f(1, 0)`, but you don't know which. -Technically, the behavior is undefined. -In C++17, this code does not have undefined behavior, but it is still not specified which argument is evaluated first. +Before C++17, the behavior is undefined, so the behavior could be anything (e.g., `f(2, 2)`). +Since C++17, this code does not have undefined behavior, but it is still not specified which argument is evaluated first. The call will be `f(1, 2)` or `f(2, 1)`, but you don't know which. ##### Example