A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../algorithm/../../cpp/../c/language/../error.html below:

Error handling - cppreference.com

[edit] Error numbers [edit] Assertions aborts the program if the user-specified condition is not true. May be disabled for release builds
(function macro) [edit] issues a compile-time diagnostic if the value of a constant expression is false
(keyword macro) Bounds checking

The standard library provides bounds-checked versions of some existing functions (gets_s, fopen_s, printf_s, strcpy_s, wcscpy_s, mbstowcs_s, qsort_s, getenv_s, etc). This functionality is optional and is only available if __STDC_LIB_EXT1__ is defined. The following macros and functions support this functionality.

  a typedef for the type int, used to self-document functions that return errno values
(typedef)   a typedef for the same type as size_t, used to self-document functions that range-check their parameters at runtime
(typedef)   largest acceptable size for bounds-checked functions, expands to either constant or variable which may change at runtime (e.g. as the currently allocated memory size changes)
(macro variable)   set the error callback for bounds-checked functions
(function) [edit] abort callback for the bounds-checked functions
(function) [edit] ignore callback for the bounds-checked functions
(function) [edit]

Note: implementations of bounds-checked functions are available as open-source libraries Safe C and Slibc, and as part of Watcom C. There is also an incompatible set of bounds-checked functions available in Visual Studio.

(since C11) [edit] Notes

Since C23, static_assert is itself a keyword, which may also be a predefined macro, so <assert.h> no longer provides it.

[edit] References Extended content
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4