Skip to content

Commit

Permalink
Update CTAD description in hello-world.md
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Henderson <[email protected]>
  • Loading branch information
bluetarpmedia authored Feb 19, 2024
1 parent d8d8a5a commit cea9221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/welcome/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ All grammar is context-free. In particular, we (the human reading the code, and

<a id="CTAD"></a>

- Declaring `words` uses **"CTAD"** (C++'s normal [constructor template argument deduction](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction)) to declare its `words` variable.
- Declaring `words` uses **"CTAD"** (C++'s normal [constructor template argument deduction](https://en.cppreference.com/w/cpp/language/class_template_argument_deduction)) to deduce the type of elements in the `vector`.

- Calling `words[0]` and `words[1]` is **bounds-checked by default**. From Cpp2 code, ordinary `std::vector` subscript accesses are safely bounds-checked by default without requiring any upgrade to your favorite standard library, and that's true for any similar subscript of something whose size can be queried using `std::size()` and `std::ssize()`, and for which `std::begin()` returns a random access iterator, including any in-house integer-indexed container types you already have that can easily provide `std::size()` and `std::ssize()` if they don't already.

Expand Down

0 comments on commit cea9221

Please sign in to comment.