Standard C++ Library Reference 
_HAS_ITERATOR_DEBUGGING 

Defines whether the iterator debugging feature is enabled in a debug build. By default, iterator debugging is enabled. For more information, see Debug Iterator Support.

Remarks

To enable iterator debugging in debug builds, set _HAS_ITERATOR_DEBUGGING to 1:

#define _HAS_ITERATOR_DEBUGGING 1

_HAS_ITERATOR_DEBUGGING cannot be set to 1 in retail builds.

To disable iterator debugging in debug builds, set _HAS_ITERATOR_DEBUGGING to 0:

#define _HAS_ITERATOR_DEBUGGING 0
See Also

Reference

Debug Iterator Support
Checked Iterators
Safe Libraries: Standard C++ Library

Tags :


Community Content

Richard T. Weeks
Beware binary incompatibilities
When I added /D_HAS_ITERATOR_DEBUGGING=0 to the compiler command line, the debug run-time library binary still thought that the containers had debugging fields. It really messed up the definition of methods that are compiled into the run-time library; in my case it was std::basic_string<wchar_t>::~basic_string().

You can determine this by stepping through the string class constructor and the functions it calls indirectly to see if statements between "#if _HAS_ITERATOR_DEBUGGING" and "#endif" get executed.


Tags :

Page view tracker