Skip to content

Commit 6828ff5

Browse files
authored
Updated ..< instead of ... for range operations in doc common.md (#1254)
Signed-off-by: Jost Triller <tsoj.tsoj@gmx.de>
1 parent a07d766 commit 6828ff5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/cpp2/common.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ if !vec.empty() {
191191
| `+` | `#!cpp +100` | `#!cpp +100` |
192192
| `-` | `#!cpp -100` | `#!cpp -100` |
193193

194-
The operators `.`, `..`, `*`, `&`, `~`, `++`, `--`, `()`, `[]`, `...`, `..=`, and `$` are postfix. For example:
194+
The operators `.`, `..`, `*`, `&`, `~`, `++`, `--`, `()`, `[]`, `..<`, `..=`, and `$` are postfix. For example:
195195

196196
``` cpp title="Using postfix operators"
197197
// 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
216216
| `#!cpp --` | `#!cpp iter--` | `#!cpp --iter` |
217217
| `(` `)` | `#!cpp f( 1, 2, 3)` | `#!cpp f( 1, 2, 3)` |
218218
| `[` `]` | `#!cpp vec[123]` | `#!cpp vec[123]` |
219-
| `...` | `#!cpp v.begin()...v.end()` | `#!cpp std::ranges::subrange(v.begin(), v.end())` |
219+
| `..<` | `#!cpp v.begin()..<v.end()` | `#!cpp std::ranges::subrange(v.begin(), v.end())` |
220220
| `..=` | `#!cpp 1..=10` | `#!cpp std::views::iota(1, 11)` |
221221
| `$` | `val$` | _reflection — no Cpp1 equivalent yet_ |
222222

223-
> Note: The `...` pack expansion syntax is also supported. The above `...` and `..=` are the Cpp2 range operators, which overlap in syntax.
223+
> Note: The `...` pack expansion syntax is also supported.
224224
225225
> 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.
226226

0 commit comments

Comments
 (0)