std::stacktrace_entry::operator bool

From cppreference.com
 
 
Utilities library
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)

(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)

Elementary string conversions
(C++17)
(C++17)
 
 
std::stacktrace_entry
Member functions
Observers
stacktrace_entry::operator bool
(C++23)
Query
Non-member functions
(C++23)(C++23)
(C++23)
(C++23)
Helper classes
 
constexpr explicit operator bool() const noexcept;
(since C++23)

Checks whether the stacktrace_entry is non-empty, i.e. it represents an evaluation in a stacktrace.

Parameters

(none)

Return value

true if the stacktrace_entry is non-empty, false otherwise.

Notes

A non-empty stacktrace_entry can be obtained from a std::basic_stacktrace created by std::basic_stacktrace::current or a copy of such std::basic_stacktrace.

An empty stacktrace_entry can be created by the default constructor.

Example