Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

_SECURE_SCL_THROWS 

Defines whether incorrect use of Checked Iterators causes an exception or a program termination. If defined as 1, an out of range iterator use causes an exception at runtime. If defined as 0, the program is terminated by calling invalid_parameter. The default value for _SECURE_SCL_THROWS is 0, meaning the program will be terminated by default. Requires _SECURE_SCL to also be defined.

To enable checked iterators to throw an exception on incorrect use, set _SECURE_SCL to 1 and _SECURE_SCL_THROWS to 1:

#define _SECURE_SCL 1
#define _SECURE_SCL_THROWS 1

To enable checked iterators to terminate your program on incorrect use, set _SECURE_SCL to 1 and _SECURE_SCL_THROWS to 0:

#define _SECURE_SCL 1
#define _SECURE_SCL_THROWS 0

To disable checked iterators, set _SECURE_SCL to 0.

Community Additions

ADD
Show:
© 2015 Microsoft