noexcept operator (since C++11)

From cppreference.com
< cpp‎ | language

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 potentially evaluated constructs:

In all other cases the result is true.

(until C++17)

The result is true if the set of potential exceptions of the expression is empty, and false otherwise.

(since C++17)

Keywords

noexcept