std::stacktrace_entry - cppreference.com (original) (raw)
| | | | | ------------------------ | | ------------- | | class stacktrace_entry; | | (since C++23) |
The stacktrace_entry class provides operations for querying information about an evaluation in a stacktrace. Each stacktrace_entry object is either empty, or represents an evaluation in a stacktrace.
stacktrace_entry models std::regular and std::three_way_comparable<std::strong_ordering>.
Contents
- 1 Member types
- 2 Member functions
- 3 Non-member functions
- 4 Helper classes
- 5 Notes
- 6 Example
- 7 See also
[edit] Member types
| native_handle_type | implementation-defined native handle type |
|---|
[edit] Member functions
| (constructor) | constructs a new stacktrace_entry (public member function) [edit] |
|---|---|
| (destructor) | destroys the stacktrace_entry (public member function) |
| operator= | assigns the contents of one stacktrace_entry to another (public member function) |
| Observers | |
| native_handle | gets the implementation-defined native handle of the stacktrace_entry (public member function) |
| operator bool | checks whether the stacktrace_entry is empty (public member function) |
| Query | |
| description | gets the description of the evaluation represented by the stacktrace_entry (public member function) |
| source_file | gets the name of the source file that lexically contains the expression or statement whose evaluation is represented by the stacktrace_entry (public member function) [edit] |
| source_line | gets the line number that lexically relates the evaluation represented by the stacktrace_entry (public member function) [edit] |
[edit] Non-member functions
[edit] Helper classes
[edit] Notes
boost::stacktrace::frame (available in Boost.Stacktrace) can be used instead when std::stacktrace_entry is not available.
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
| __cpp_lib_stacktrace | 202011L | (C++23) | Stacktrace library |
[edit] Example
[edit] See also
| | approximate representation of an invocation sequence consists of stacktrace entries (class template) [edit] | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | a class representing information about the source code, such as file names, line numbers, and function names (class) [edit] |