Namespaces
Variants

std::basic_stacktrace<Allocator>:: swap

From cppreference.net
void swap ( basic_stacktrace & other ) noexcept ( /* see below */ ) ;
(C++23 이후)

컨테이너의 내용을 other 의 내용과 교환합니다. 개별 stacktrace_entry 객체에 대한 이동, 복사, 또는 swap 연산을 호출하지 않습니다.

모든 반복자와 참조는 유효하게 유지됩니다. end() 반복자는 무효화됩니다.

만약 std:: allocator_traits < allocator_type > :: propagate_on_container_swap :: value 가 true인 경우, 할당자는 비멤버 swap 에 대한 한정되지 않은 호출을 사용하여 교환됩니다. 그렇지 않으면 교환되지 않으며 (만약 get_allocator ( ) ! = other. get_allocator ( ) 인 경우 동작은 정의되지 않습니다).

목차

매개변수

other - basic_stacktrace 와 내용을 교환할

반환값

(없음)

예외

noexcept 명세:
noexcept ( std:: allocator_traits < Allocator > :: propagate_on_container_swap :: value
|| std:: allocator_traits < Allocator > :: is_always_equal :: value )

복잡도

상수.

예제

참고 항목

std::swap 알고리즘을 특수화함
(함수 템플릿)