diff --git a/docs/cpp2/common.md b/docs/cpp2/common.md index 8b7a965ba..ee1a18183 100644 --- a/docs/cpp2/common.md +++ b/docs/cpp2/common.md @@ -191,7 +191,7 @@ if !vec.empty() { | `+` | `#!cpp +100` | `#!cpp +100` | | `-` | `#!cpp -100` | `#!cpp -100` | -The operators `.`, `..`, `*`, `&`, `~`, `++`, `--`, `()`, `[]`, `...`, `..=`, and `$` are postfix. For example: +The operators `.`, `..`, `*`, `&`, `~`, `++`, `--`, `()`, `[]`, `..<`, `..=`, and `$` are postfix. For example: ``` cpp title="Using postfix operators" // Cpp1 examples, from cppfront's own source code: @@ -216,11 +216,11 @@ Postfix notation lets the code read fluidly left-to-right, in the same order in | `#!cpp --` | `#!cpp iter--` | `#!cpp --iter` | | `(` `)` | `#!cpp f( 1, 2, 3)` | `#!cpp f( 1, 2, 3)` | | `[` `]` | `#!cpp vec[123]` | `#!cpp vec[123]` | -| `...` | `#!cpp v.begin()...v.end()` | `#!cpp std::ranges::subrange(v.begin(), v.end())` | +| `..<` | `#!cpp v.begin().. Note: The `...` pack expansion syntax is also supported. The above `...` and `..=` are the Cpp2 range operators, which overlap in syntax. +> Note: The `...` pack expansion syntax is also supported. > Note: Because `++` and `--` always have in-place update semantics, we never need to remember "use prefix `++`/`--` unless you need a copy of the old value." If you do need a copy of the old value, just take the copy before calling `++`/`--`. When you write a copyable type that overloads `operator++` or `operator--`, cppfront generates also the copy-old-value overload of that function to support natural use of the type from Cpp1 code.