explicit specifier

Specifies constructors and conversion operators (since C++11) that don't allow implicit conversions or copy-initialization. Syntax explicit class_name ( params ) (1) explicit operator type ( ) (since C++11) (2) 1) specifies that this constructor is only considered for direct initialization (including explicit conversions) 2) specifies that this user-defined conversion function is only considered for direct initialization (including explicit conversions) Notes A constructo

explicit

Usage explicit specifier

Exceptions

Exception handling provides a way of transferring control and information from some point in the execution of a program to a handler associated with a point previously passed by the execution (in other words, exception handling transfers control up the call stack). An exception can be thrown by a throw-expression, dynamic_cast, typeid, new-expression, allocation function, and any of the standard library functions that are specified to throw exceptions to signal certain error conditions (e.g. st

exception

This header is part of the error handling library. Classes exception base class for exceptions thrown by the standard library components (class) nested_exception (C++11) a mixin type to capture and store current exceptions (class) bad_exception exception thrown when dynamic exception specification is violated, if possible (class) Typedefs unexpected (deprecated since C++11) function called when dynamic exception specification is violated (function) unexpect

EXIT_SUCCESS

Defined in header <cstdlib> #define EXIT_SUCCESS /*implementation defined*/ #define EXIT_FAILURE /*implementation defined*/ The EXIT_SUCCESS and EXIT_FAILURE macros expand into integral expressions that can be used as arguments to the std::exit function (and, therefore, as the values to return from the main function), and indicate program execution status. Constant Explanation EXIT_SUCCESS successful execution of a program EXIT_FAILURE unsuccessful executio

Escape sequences

Escape sequences are used to represent certain special characters within string literals and character literals. The following escape sequences are available (extra escape sequences may be provided with implementation-defined semantics): Escape sequence Description Representation \' single quote byte 0x27 in ASCII encoding \" double quote byte 0x22 in ASCII encoding \? question mark byte 0x3f in ASCII encoding \\ backslash byte 0x5c in ASCII encoding \a audible

Error handling

Exception handling The header <exception> provides several classes and functions related to exception handling in C++ programs. Defined in header <exception> exception base class for exceptions thrown by the standard library components (class) Capture and storage of exception objects uncaught_exceptionuncaught_exceptions (C++17) checks if exception handling is currently in progress (function) exception_ptr (C++11) shared pointer type for handling except

Error numbers

Each of the macros defined in <cerrno> expands to integer constant expressions with type int, each with a positive value, matching most of the POSIX error codes. The following constants are defined (the implementation may define more, as long as they begin with 'E' followed by digits or uppercase letters). Defined in header <cerrno> E2BIG (C++11) Argument list too long (macro constant) EACCES (C++11) Permission denied (macro constant) EADDRINUSE (C++11) Address i

Erasable

Specifies that an object of the type can be destroyed by a given Allocator. Requirements The type T is Erasable from the Container X whose value_type is identical to T if, given. A an allocator type m an lvalue of type A p the pointer of type T* prepared by the container where X::allocator_type is identical to std::allocator_traits<A>::rebind_alloc<T>, the following expression is well-formed: std::allocator_traits<A>::destroy(m, p); If X is not allocator-aware

Error directive

Shows given message and renders program ill-formed. Syntax #error error_message Explanation After encountering #error directive, diagnostic message error_message is shown and the program is rendered ill-formed (the compilation is stopped). error_message can consist of several words not necessarily in quotes. See also C documentation for Error directive