Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/utility/basic stacktrace/swap2"

From cppreference.com
(+)
 
m (fmt, {{c}})
 
Line 1: Line 1:
{{cpp/title | swap<small>(std::basic_stacktrace)</small>}}
+
{{cpp/title|swap<small>(std::basic_stacktrace)</small>}}
 
{{cpp/utility/basic_stacktrace/navbar}}
 
{{cpp/utility/basic_stacktrace/navbar}}
{{ddcl | header=stacktrace | since=c++23 |
+
{{ddcl|header=stacktrace|since=c++23|
 
template< class Allocator >
 
template< class Allocator >
 
void swap( std::basic_stacktrace<Allocator>& lhs, std::basic_stacktrace<Allocator>& rhs )
 
void swap( std::basic_stacktrace<Allocator>& lhs, std::basic_stacktrace<Allocator>& rhs )
Line 7: Line 7:
 
}}
 
}}
  
Specializes the {{lc|std::swap}} algorithm for {{lc|std::basic_stacktrace}}. Swaps the contents of {{tt|lhs}} and {{tt|rhs}}. Equivalent to {{c|lhs.swap(rhs);}}.
+
Specializes the {{lc|std::swap}} algorithm for {{lc|std::basic_stacktrace}}. Swaps the contents of {{c|lhs}} and {{c|rhs}}. Equivalent to {{c|lhs.swap(rhs);}}.
  
 
===Parameters===
 
===Parameters===
 
{{par begin}}
 
{{par begin}}
{{par | lhs, rhs | stacktraces whose contents to swap}}
+
{{par|lhs, rhs|stacktraces whose contents to swap}}
 
{{par end}}  
 
{{par end}}  
  
Line 25: Line 25:
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/utility/basic_stacktrace/dsc swap}}
+
{{dsc inc|cpp/utility/basic_stacktrace/dsc swap}}
 
{{dsc end}}
 
{{dsc end}}
  
 
{{langlinks|es|ja|ru|zh}}
 
{{langlinks|es|ja|ru|zh}}

Latest revision as of 23:07, 13 October 2023

 
 
 
 
Defined in header <stacktrace>
template< class Allocator >

void swap( std::basic_stacktrace<Allocator>& lhs, std::basic_stacktrace<Allocator>& rhs )

    noexcept(noexcept(lhs.swap(rhs)));
(since C++23)

Specializes the std::swap algorithm for std::basic_stacktrace. Swaps the contents of lhs and rhs. Equivalent to lhs.swap(rhs);.

Contents

[edit] Parameters

lhs, rhs - stacktraces whose contents to swap

[edit] Return value

(none)

[edit] Complexity

Constant.

[edit] Example

[edit] See also

swaps the contents
(public member function) [edit]