std::experimental::bad_optional_access

From cppreference.com
 
 
Technical specifications
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals 2 TS)
Extensions for parallelism (parallelism TS)
Extensions for concurrency (concurrency TS)
Concepts (concepts TS)
Ranges (ranges TS)
Special mathematical functions (special math TR)
 
 
 
Defined in header <experimental/optional>
class bad_optional_access;
(library fundamentals TS)

Defines a type of object to be thrown by std::experimental::optional::value when accessing an optional object that does not contain a value.

cpp/error/exceptioncpp/error/logic errorstd-bad optional access-inheritance.svg
About this image

Inheritance diagram

Member functions

(constructor)
constructs the exception object
(public member function)

Inherited from std::exception

Member functions

[virtual]
destructs the exception object
(virtual public member function of std::exception)
[virtual]
returns an explanatory string
(virtual public member function of std::exception)