You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Checked iterators ensure that the bounds of your container are not overwritten. Checked iterators apply to both release builds and debug builds. For more information about how to use debug iterators when you compile in debug mode, see [Debug Iterator Support](../standard-library/debug-iterator-support.md).
11
+
Checked iterators ensure that the bounds of your container are not overwritten. Checked iterators apply to both release builds and debug builds. For more information about how to use debug iterators when you compile in debug mode, see [Debug Iterator Support](debug-iterator-support.md).
12
12
13
13
## Remarks
14
14
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`](scl-secure-no-warnings.md).
16
16
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`](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.
18
18
19
19
> [!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`](secure-scl.md) macro. Use `_ITERATOR_DEBUG_LEVEL` to control `_SECURE_SCL`. For more information, see [`_ITERATOR_DEBUG_LEVEL`](iterator-debug-level.md).
21
21
22
22
When `_ITERATOR_DEBUG_LEVEL` is defined as 1 or 2, these iterator checks are performed:
23
23
24
-
- All standard iterators (for example, [`vector::iterator`](../standard-library/vector-class.md#iterator)) are checked.
24
+
- All standard iterators (for example, [`vector::iterator`](vector-class.md#iterator)) are checked.
25
25
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`](algorithm-functions.md#copy) get checked behavior.
27
27
28
28
- If an output iterator is an unchecked iterator, calls to standard library functions cause compiler warnings.
29
29
30
30
- The following functions generate a runtime error if there is an access that is outside the bounds of the container:
@@ -60,7 +60,7 @@ When `_ITERATOR_DEBUG_LEVEL` is defined as 0:
60
60
61
61
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).
62
62
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](checked-array-iterator-class.md) and [`unchecked_array_iterator` Class](unchecked-array-iterator-class.md).
0 commit comments