noexcept specifier

Specifies whether a function will throw exceptions or not. Syntax noexcept (1) noexcept(expression) (2) 1) Same as noexcept ( true ) 2) If expression evaluates to true, the function is declared to not throw any exceptions. expression - constant expression, contextually convertible to bool Explanation The noexcept-specification (just like dynamic exception specification) can appear as a part of a lambda declarator or a top-level function declarator when declaring f

noexcept operator

The noexcept operator performs a compile-time check that returns true if an expression is declared to not throw any exceptions. It can be used within a function template's noexcept specifier to declare that the function will throw exceptions for some types but not others. Syntax noexcept( expression ) Returns a prvalue of type bool. Explanation The noexcept operator does not evaluate expression. The result is false if the expression contains at least one of the following potenti

noexcept

Usage noexcept operator noexcept specifier

new expression

Creates and initializes objects with dynamic storage duration, that is, objects whose lifetime is not limited by the scope in which they were created. Syntax ::(optional) new (placement_params)(optional) ( type ) initializer(optional) (1) ::(optional) new (placement_params)(optional) type initializer(optional) (2) 1) Attempts to create an object of type, denoted by the type-id type, which may be array type, and may include the type specifier auto (since C++11)or the placeholde

new

Usage new expression allocation functions as the name of operator-like functions

new

This header is part of the dynamic memory management library, in particular provides low level memory management features. Functions operator newoperator new[] allocation functions (function) operator deleteoperator delete[] deallocation functions (function) get_new_handler (C++11) obtains the current new handler (function) set_new_handler registers a new handler (function) Classes bad_alloc exception thrown when memory allocation fails (class) bad_arr

nested classes

A declaration of a class/struct or union may appear in within another class. Such declaration declares a nested class. Explanation The name of the nested class exists in the scope of the enclosing class, and name lookup from a member function of a nested class visits the scope of the enclosing class after examining the scope of the nested class. As any member of its enclosing class, nested class has access to all names (private, protected, etc) to which the enclosing class has access, but it

NAN

Defined in header <cmath> #define NAN /*implementation defined*/ (since C++11) The macro NAN expands to constant expression of type float which evaluates to a quiet not-a-number (QNaN) value. If the implementation does not support QNaNs, this macro constant is not defined. Notes There are many different NaN values, differentiated by their payloads and their sign bits. The contents of the payload and the sign bit of the NaN generated by the macro NAN are implementation-de

Namespaces

Namespaces provide a method for preventing name conflicts in large projects. Symbols declared inside a namespace block are placed in a named scope that prevents them from being mistaken for identically-named symbols in other scopes. Multiple namespace blocks with the same name are allowed. All declarations within those blocks are declared in the named scope. Syntax namespace ns_name { declarations } (1) inline namespace ns_name { declarations } (2) (since C++11) namespace { decl

Namespace aliases

Namespace aliases allow the programmer to define an alternate name for a namespace. They are commonly used as a convenient shortcut for long or deeply-nested namespaces. Syntax namespace alias_name = ns_name; (1) namespace alias_name = ::ns_name; (2) namespace alias_name = nested_name::ns_name; (3) Explanation The new alias alias_name provides an alternate method of accessing ns_name. alias_name must be a name not previously used. alias_name is valid for the duration o