GDB (xrefs)

Public Member Functions | Private Member Functions | Private Attributes | List of all members
gdb::optional< T > Class Template Reference

`#include "gdb_optional.h"`

## Public Member Functions
constexpr | optional ()
template<typename... Args>
constexpr | optional (in_place_t, Args &&... args)
| ~optional ()
| optional (const optional &other)
| optional (optional &&other) noexcept(std::is_nothrow_move_constructible< T >())
constexpr | optional (const T &other)
constexpr | optional (T &&other) noexcept(std::is_nothrow_move_constructible< T >())
optional & | operator= (const optional &other)
optional & | operator= (optional &&other) noexcept(And< std::is_nothrow_move_constructible< T >, std::is_nothrow_move_assignable< T >>())
optional & | operator= (const T &other)
optional & | operator= (T &&other) noexcept(And< std::is_nothrow_move_constructible< T >, std::is_nothrow_move_assignable< T >>())
template<typename... Args>
T & | emplace (Args &&... args)
constexpr const T * | operator-> () const
T * | operator-> ()
constexpr const T & | operator* () const &
T & | operator* () &
T && | operator* () &&
constexpr const T && | operator* () const &&
constexpr | operator bool () const noexcept
constexpr bool | has_value () const noexcept
void | reset () noexcept

## Private Member Functions
void | destroy ()
T & | get () noexcept
constexpr const T & | get () const noexcept

## Private Attributes
union {
struct {
} m_dummy
T m_item
}; |
bool | m_instantiated = false

## Detailed Description

### template<typename T>
class gdb::optional< T >

Definition at line 51 of file gdb_optional.h.

## Constructor & Destructor Documentation

## ◆ optional() [1/6]

template<typename T>

constexpr gdb::optional< T >::optional | ( |  | ) |
| inline

Definition at line 55 of file gdb_optional.h.

## ◆ optional() [2/6]

template<typename T>
template<typename... Args>

constexpr gdb::optional< T >::optional | ( | in_place_t | ,
|  | Args &&... | args
| ) |  |
| inline

Definition at line 60 of file gdb_optional.h.

## ◆ ~optional()

template<typename T>

gdb::optional< T >::~optional | ( |  | ) |
| inline

Definition at line 65 of file gdb_optional.h.

## ◆ optional() [3/6]

template<typename T>

gdb::optional< T >::optional | ( | const optional< T > & | other | ) |
| inline

Definition at line 70 of file gdb_optional.h.

## ◆ optional() [4/6]

template<typename T>

gdb::optional< T >::optional | ( | optional< T > && | other | ) |
| inline noexcept

Definition at line 76 of file gdb_optional.h.

## ◆ optional() [5/6]

template<typename T>

constexpr gdb::optional< T >::optional | ( | const T & | other | ) |
| inline

Definition at line 83 of file gdb_optional.h.

## ◆ optional() [6/6]

template<typename T>

constexpr gdb::optional< T >::optional | ( | T && | other | ) |
| inline noexcept

Definition at line 88 of file gdb_optional.h.

## Member Function Documentation

## ◆ destroy()

template<typename T>

void gdb::optional< T >::destroy | ( |  | ) |
| inline private

Definition at line 195 of file gdb_optional.h.

Referenced by gdb::optional< ada_lookup_name_info >::reset().

## ◆ emplace()

template<typename T>
template<typename... Args>

T& gdb::optional< T >::emplace | ( | Args &&... | args | ) |
| inline

Definition at line 152 of file gdb_optional.h.

Referenced by adjust_pc_after_break(), ATTRIBUTE_PRINTF(), cmd_func(), collect_probes(), compile_to_object(), do_mixed_source_and_assembly(), do_mixed_source_and_assembly_deprecated(), dw2_map_symbol_filenames(), enumerate_locals(), fetch_inferior_event(), find_and_open_script(), handle_signal_stop(), handle_vfork_child_exec_or_exit(), ioscm_with_output_to_port_worker(), list_arg_or_local(), mapping_is_anonymous_p(), mi_cmd_execute(), mi_cmd_var_list_children(), mi_cmd_var_update(), mi_execute_command(), notice_new_inferior(), gdb::optional< ada_lookup_name_info >::operator=(), gdb::optional< ada_lookup_name_info >::optional(), parse_expression_with_language(), print_flush(), print_it_watchpoint(), print_thread_info_1(), print_variable_or_computed(), py_print_frame(), py_print_single_arg(), read_formatted_entries(), search_symbols(), skiplist_entry::skiplist_entry(), assign_6::test(), varobj_update_one(), and vwarning().

## ◆ get() [1/2]

template<typename T>

T& gdb::optional< T >::get | ( |  | ) |
| inline private noexcept

Definition at line 203 of file gdb_optional.h.

Referenced by gdb::optional< ada_lookup_name_info >::operator=(), and gdb::optional< ada_lookup_name_info >::optional().

## ◆ get() [2/2]

template<typename T>

constexpr const T& gdb::optional< T >::get | ( |  | ) | const
| inline private noexcept

Definition at line 204 of file gdb_optional.h.

## ◆ has_value()

template<typename T>

constexpr bool gdb::optional< T >::has_value | ( |  | ) | const
| inline noexcept

Definition at line 182 of file gdb_optional.h.

Referenced by do_mixed_source_and_assembly(), and read_formatted_entries().

## ◆ operator bool()

template<typename T>

constexpr gdb::optional< T >::operator bool | ( |  | ) | const
| inline explicit noexcept

Definition at line 179 of file gdb_optional.h.

## ◆ operator*() [1/4]

template<typename T>

constexpr const T& gdb::optional< T >::operator* | ( |  | ) | const &
| inline

Definition at line 167 of file gdb_optional.h.

## ◆ operator*() [2/4]

template<typename T>

T& gdb::optional< T >::operator* | ( |  | ) | &
| inline

Definition at line 170 of file gdb_optional.h.

## ◆ operator*() [3/4]

template<typename T>

T&& gdb::optional< T >::operator* | ( |  | ) | &&
| inline

Definition at line 173 of file gdb_optional.h.

## ◆ operator*() [4/4]

template<typename T>

constexpr const T&& gdb::optional< T >::operator* | ( |  | ) | const &&
| inline

Definition at line 176 of file gdb_optional.h.

## ◆ operator->() [1/2]

template<typename T>

constexpr const T* gdb::optional< T >::operator-> | ( |  | ) | const
| inline

Definition at line 161 of file gdb_optional.h.

## ◆ operator->() [2/2]

template<typename T>

T* gdb::optional< T >::operator-> | ( |  | ) |
| inline

Definition at line 164 of file gdb_optional.h.

## ◆ operator=() [1/4]

template<typename T>

optional& gdb::optional< T >::operator= | ( | const optional< T > & | other | ) |
| inline

Definition at line 97 of file gdb_optional.h.

## ◆ operator=() [2/4]

template<typename T>

optional& gdb::optional< T >::operator= | ( | optional< T > && | other | ) |
| inline noexcept

Definition at line 113 of file gdb_optional.h.

## ◆ operator=() [3/4]

template<typename T>

optional& gdb::optional< T >::operator= | ( | const T & | other | ) |
| inline

Definition at line 130 of file gdb_optional.h.

## ◆ operator=() [4/4]

template<typename T>

optional& gdb::optional< T >::operator= | ( | T && | other | ) |
| inline noexcept

Definition at line 140 of file gdb_optional.h.

## ◆ reset()

template<typename T>

void gdb::optional< T >::reset | ( |  | ) |
| inline noexcept

Definition at line 186 of file gdb_optional.h.

Referenced by do_mixed_source_and_assembly(), do_mixed_source_and_assembly_deprecated(), gdb::optional< ada_lookup_name_info >::emplace(), gdb::optional< ada_lookup_name_info >::operator=(), source_script_file(), and gdb::optional< ada_lookup_name_info >::~optional().

## Member Data Documentation

## ◆ @26

union { ... }

## ◆ m_dummy

struct { ... } gdb::optional< T >::m_dummy

## ◆ m_instantiated

template<typename T>

bool gdb::optional< T >::m_instantiated = false
| private

Definition at line 214 of file gdb_optional.h.

Referenced by gdb::optional< ada_lookup_name_info >::destroy(), gdb::optional< ada_lookup_name_info >::emplace(), gdb::optional< ada_lookup_name_info >::has_value(), gdb::optional< ada_lookup_name_info >::operator bool(), gdb::optional< ada_lookup_name_info >::operator=(), gdb::optional< ada_lookup_name_info >::optional(), and gdb::optional< ada_lookup_name_info >::reset().

## ◆ m_item

template<typename T>

T gdb::optional< T >::m_item

Definition at line 210 of file gdb_optional.h.

Referenced by gdb::optional< ada_lookup_name_info >::destroy(), gdb::optional< ada_lookup_name_info >::emplace(), and gdb::optional< ada_lookup_name_info >::get().

The documentation for this class was generated from the following file:

- /tmp/gdb-8.1/gdb/common/gdb_optional.h