Namespaces
Variants
Views
Actions

std::to_string

From cppreference.com
< cpp‎ | utility‎ | stacktrace entry
Revision as of 00:07, 25 January 2021 by Fruderica (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
Defined in header <stacktrace>
std::string to_string( const std::stacktrace_entry& f );
(since C++23)

Returns a string with a description of f.

The standard recommends that the description should provide information about the contained evaluation, including information from f.source_file() and f.source_line().

Contents

Parameters

f - a stacktrace_entry whose description is to be returned

Return value

A string with a description of f.

Exceptions

May throw implementation-defined exceptions.

Notes

Custom allocators support for this function is not provided, because the implementations usually require platform specific allocations, system calls and a lot of CPU intensive work, while a custom allocator does not provide benefits for this function as the platform specific operations take an order of magnitude more time than the allocation.

Example

See also

(C++23)
returns a string with a description of the basic_stacktrace
(function template) [edit]