Namespaces
Variants
Actions

std::format_error

From cppreference.com
< cpp‎ | utility‎ | format
 
 
 
 
Defined in header <format>
class format_error : public runtime_error
(since C++20)

Defines the type of exception object thrown to report errors in the formatting library.

All member functions of std::format_error are constexpr: it is possible to create and use std::format_error objects in the evaluation of a constant expression.

However, std::format_error objects generally cannot be constexpr, because any dynamically allocated storage must be released in the same evaluation of constant expression.

(since C++26)
cpp/error/exceptioncpp/error/runtime errorstd-format error-inheritance.svg

Inheritance diagram

Contents