Skip to content

Commit 31d1d56

Browse files
authored
Add backticks in "Checked Iterators" topic
1 parent 6d9d959 commit 31d1d56

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/standard-library/checked-iterators.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ Checked iterators ensure that the bounds of your container are not overwritten.
1212

1313
## Remarks
1414

15-
For information about how to disable warnings that are generated by checked iterators, see [_SCL_SECURE_NO_WARNINGS](../standard-library/scl-secure-no-warnings.md).
15+
For information about how to disable warnings that are generated by checked iterators, see [`_SCL_SECURE_NO_WARNINGS`](../standard-library/scl-secure-no-warnings.md).
1616

17-
You can use the [\_ITERATOR\_DEBUG\_LEVEL](../standard-library/iterator-debug-level.md) preprocessor macro to enable or disable the checked iterators feature. If _ITERATOR_DEBUG_LEVEL is defined as 1 or 2, unsafe use of iterators causes a runtime error and the program is terminated. If defined as 0, checked iterators are disabled. By default, the value for _ITERATOR_DEBUG_LEVEL is 0 for release builds and 2 for debug builds.
17+
You can use the [`_ITERATOR_DEBUG_LEVEL`](../standard-library/iterator-debug-level.md) preprocessor macro to enable or disable the checked iterators feature. If `_ITERATOR_DEBUG_LEVEL` is defined as 1 or 2, unsafe use of iterators causes a runtime error and the program is terminated. If defined as 0, checked iterators are disabled. By default, the value for `_ITERATOR_DEBUG_LEVEL` is 0 for release builds and 2 for debug builds.
1818

1919
> [!IMPORTANT]
20-
> Older documentation and source code may refer to the [_SECURE_SCL](../standard-library/secure-scl.md) macro. Use _ITERATOR_DEBUG_LEVEL to control _SECURE_SCL. For more information, see [_ITERATOR_DEBUG_LEVEL](../standard-library/iterator-debug-level.md).
20+
> Older documentation and source code may refer to the [`_SECURE_SCL`](../standard-library/secure-scl.md) macro. Use `_ITERATOR_DEBUG_LEVEL` to control `_SECURE_SCL`. For more information, see [`_ITERATOR_DEBUG_LEVEL`](../standard-library/iterator-debug-level.md).
2121
22-
When _ITERATOR_DEBUG_LEVEL is defined as 1 or 2, these iterator checks are performed:
22+
When `_ITERATOR_DEBUG_LEVEL` is defined as 1 or 2, these iterator checks are performed:
2323

24-
- All standard iterators (for example, [vector::iterator](../standard-library/vector-class.md#iterator)) are checked.
24+
- All standard iterators (for example, [`vector::iterator`](../standard-library/vector-class.md#iterator)) are checked.
2525

26-
- If an output iterator is a checked iterator, calls to standard library functions such as [std::copy](../standard-library/algorithm-functions.md#copy) get checked behavior.
26+
- If an output iterator is a checked iterator, calls to standard library functions such as [`std::copy`](../standard-library/algorithm-functions.md#copy) get checked behavior.
2727

2828
- If an output iterator is an unchecked iterator, calls to standard library functions cause compiler warnings.
2929

@@ -50,7 +50,7 @@ When _ITERATOR_DEBUG_LEVEL is defined as 1 or 2, these iterator checks are perfo
5050
:::column-end:::
5151
:::row-end:::
5252

53-
When _ITERATOR_DEBUG_LEVEL is defined as 0:
53+
When `_ITERATOR_DEBUG_LEVEL` is defined as 0:
5454

5555
- All standard iterators are unchecked. Iterators can move beyond the container boundaries, which leads to undefined behavior.
5656

@@ -60,11 +60,11 @@ When _ITERATOR_DEBUG_LEVEL is defined as 0:
6060

6161
A checked iterator refers to an iterator that calls `invalid_parameter_handler` if you attempt to move past the boundaries of the container. For more information about `invalid_parameter_handler`, see [Parameter Validation](../c-runtime-library/parameter-validation.md).
6262

63-
The iterator adaptors that support checked iterators are [checked_array_iterator Class](../standard-library/checked-array-iterator-class.md) and [unchecked_array_iterator Class](../standard-library/unchecked-array-iterator-class.md).
63+
The iterator adaptors that support checked iterators are [`checked_array_iterator` Class](../standard-library/checked-array-iterator-class.md) and [`unchecked_array_iterator` Class](../standard-library/unchecked-array-iterator-class.md).
6464

6565
## Examples
6666

67-
When you compile by using _ITERATOR_DEBUG_LEVEL set to 1 or 2, a runtime error will occur if you attempt to access an element that is outside the bounds of the container by using the indexing operator of certain classes.
67+
When you compile by using `_ITERATOR_DEBUG_LEVEL` set to 1 or 2, a runtime error will occur if you attempt to access an element that is outside the bounds of the container by using the indexing operator of certain classes.
6868

6969
```cpp
7070
// checked_iterators_1.cpp
@@ -91,7 +91,7 @@ int main()
9191

9292
This program prints "67" then pops up an assertion failure dialog box with additional information about the failure.
9393

94-
Similarly, when you compile by using _ITERATOR_DEBUG_LEVEL set to 1 or 2, a runtime error will occur if you attempt to access an element by using `front` or `back` in container classes when the container is empty.
94+
Similarly, when you compile by using `_ITERATOR_DEBUG_LEVEL` set to 1 or 2, a runtime error will occur if you attempt to access an element by using `front` or `back` in container classes when the container is empty.
9595

9696
```cpp
9797
// checked_iterators_2.cpp
@@ -113,7 +113,7 @@ int main()
113113

114114
This program pops up an assertion failure dialog box with additional information about the failure.
115115

116-
The following code demonstrates various iterator use-case scenarios with comments about each. By default, _ITERATOR_DEBUG_LEVEL is set to 2 in Debug builds, and to 0 in Retail builds.
116+
The following code demonstrates various iterator use-case scenarios with comments about each. By default, `_ITERATOR_DEBUG_LEVEL` is set to 2 in Debug builds, and to 0 in Retail builds.
117117

118118
```cpp
119119
// checked_iterators_3.cpp

0 commit comments

Comments
 (0)