[#beman-optional-bad_optional_access]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::bad&lowbar;optional&lowbar;access
:relfileprefix: ../../
:mrdocs:

Exception thrown when trying to access the value of an empty optional

== Synopsis

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class bad&lowbar;optional&lowbar;access
    : public std::exception
----

== Base Classes

[cols=2]
|===
| Name
| Description
| `std::exception`
| 
|===

== Member Functions

[cols=2]
|===
| Name
| Description
| xref:beman/optional/bad_optional_access/2constructor.adoc[`bad&lowbar;optional&lowbar;access`]         [.small]#[constructor]#
| Construct a new bad optional access object
| xref:beman/optional/bad_optional_access/operator_assign.adoc[`operator&equals;`] 
| 
| xref:beman/optional/bad_optional_access/what.adoc[`what`]  [.small]#[virtual]#
| Get the error message for bad optional access
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
