Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::swap(std::indirect)

      From cppreference.com
      <cpp‎ |memory‎ |indirect
       
       
      Memory management library
      (exposition only*)
      Allocators
      Uninitialized memory algorithms
      Constrained uninitialized memory algorithms
      Memory resources
      Uninitialized storage(until C++20)
      (until C++20*)
      (until C++20*)
      Garbage collector support(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
      (C++11)(until C++23)
       
       
      Defined in header<memory>
      constexprvoid swap( indirect& lhs, indirect& rhs)
         noexcept(noexcept(lhs.swap(rhs)));
      (since C++26)

      Overloads thestd::swap algorithm forstd::indirect. Exchanges the state oflhs with that ofrhs. Effectively callslhs.swap(rhs).

      [edit]Parameters

      lhs, rhs -indirect objects whose states to swap

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      exchanges the contents
      (public member function)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/memory/indirect/swap2&oldid=182609"

      [8]ページ先頭

      ©2009-2025 Movatter.jp