Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/stacktrace entry"

From cppreference.com
< cpp‎ | utility
m (See also: + source_location)
(Member functions: templatize)
Line 26: Line 26:
 
{{dsc h2 | Query}}
 
{{dsc h2 | Query}}
 
{{dsc mem fun | cpp/utility/stacktrace_entry/description | notes={{mark c++23}} | gets the description of the evaluation represented by the {{tt|stacktrace_entry}} }}
 
{{dsc mem fun | cpp/utility/stacktrace_entry/description | notes={{mark c++23}} | gets the description of the evaluation represented by the {{tt|stacktrace_entry}} }}
{{dsc mem fun | cpp/utility/stacktrace_entry/source_file | notes={{mark c++23}} | gets the name of the source file that lexically contains the expression or statement whose evaluation is represented by the {{tt|stacktrace_entry}} }}
+
{{dsc inc | cpp/utility/stacktrace_entry/dsc source_file}}
{{dsc mem fun | cpp/utility/stacktrace_entry/source_line | notes={{mark c++23}} | gets the line number that lexically relates the evaluation represented by the {{tt|stacktrace_entry}} }}
+
{{dsc inc | cpp/utility/stacktrace_entry/dsc source_line}}
 
{{dsc end}}
 
{{dsc end}}
  

Revision as of 10:05, 22 January 2021

 
 
 
 
Defined in header <stacktrace>
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

Member types

native_handle_type
(C++23)
implementation-defined native handle type
(typedef)

Member functions

constructs a new stacktrace_entry
(public member function)
destroys the stacktrace_entry
(public member function)
(C++23)
assigns the contents of one stacktrace_entry to another
(public member function)
Observers
gets the implementation-defined native handle of the stacktrace_entry
(public member function)
checks whether the stacktrace_entry is empty
(public member function)
Query
gets the description of the evaluation represented by the stacktrace_entry
(public member function)
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]
gets the line number that lexically relates the evaluation represented by the stacktrace_entry
(public member function) [edit]

Non-member functions

compares two stacktrace_entry values
(function)
(C++23)
returns a string with a description of the stacktrace_entry
(function) [edit]
performs stream output of stacktrace_entry
(function template) [edit]

Helper classes

hash support for std::stacktrace_entry
(class template specialization) [edit]

Example

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]