std::swap(std::weak_ptr)

template< class T >
void swap( weak_ptr<T>& lhs, weak_ptr<T>& rhs ) noexcept;
(C++11 起)

std::weak_ptr 特化 std::swap 算法。交换 lhsrhs 的指针。调用 lhs.swap(rhs)


目录

参数

lhs, rhs - 要交换内容的智能指针

返回值

(无)

复杂度

常数

参阅

交换两个对象的值
(函数模板)
交换内容
(公开成员函数)

版本历史

  • (当前 | 先前 2017年6月8日 (四) 07:27Fruderica讨论 | 贡献 . . (68字节) (-226). . (撤销)
  • 当前 | 先前 2012年11月2日 (五) 13:37P12bot讨论 | 贡献 . . (294字节) (+265). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 14:56P12讨论 | 贡献 . . (29字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月22日 (一) 14:48TranslationBot讨论 | 贡献. . (29字节) (+29). . (Translated from the English version using Google Translate)