Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      swap(std::mdspan)

      From cppreference.com
      <cpp‎ |container‎ |mdspan
       
       
       
       
      friendconstexprvoid swap( mdspan& x, mdspan& y)noexcept;
      (since C++23)

      Overloads thestd::swap algorithm forstd::mdspan. Exchanges the state ofx with that ofy. Equivalent to:

      std::swap(x.acc_, y.acc_);
      std::swap(x.map_, y.map_);
      std::swap(x.ptr_, y.ptr_);

      This function is not visible to ordinaryunqualified orqualified lookup, and can only be found byargument-dependent lookup whenstd::mdspan is an associated class of the arguments.

      Contents

      [edit]Parameters

      x, y -mdspan objects whose states to swap

      [edit]Return value

      (none)

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      This section is incomplete
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/container/mdspan/swap2&oldid=177150"

      [8]ページ先頭

      ©2009-2025 Movatter.jp