다음을 통해 공유


unique_ptr::swap

Exchanges pointers between two unique_ptr objects.

void swap(unique_ptr& _Right);

매개 변수

  • _Right
    A unique_ptr used to swap pointers.

설명

The member function swaps stored_ptr with right.stored_ptr and stored_deleter with right.stored_deleter.

요구 사항

헤더 <memory>

네임스페이스: std

참고 항목

참조

unique_ptr 클래스

<memory>

C++ 표준 라이브러리의 스레드 보안

기타 리소스

unique_ptr 멤버

<memory> 멤버