std::unique_lock::operator bool

explicit operator bool() const noexcept;
(C++11 起)

检查 *this 是否占有锁定的互斥。等效地调用 owns_lock()

参数

(无)

返回值

*this 拥有关联互斥且已获得其所有权则为 true ,否则为 false

参阅

测试锁是否占有其关联互斥
(公开成员函数)

版本历史

  • (当前 | 先前 2017年8月26日 (六) 07:54Fruderica讨论 | 贡献. . (540字节) (-582). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:36P12bot讨论 | 贡献 . . (1,122字节) (-63). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 17:55P12bot讨论 | 贡献 . . (1,185字节) (+353). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月27日 (六) 11:34P12讨论 | 贡献 . . (832字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (832字节) (-39). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:32P12讨论 | 贡献 . . (871字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (871字节) (+871). . (Translated from the English version using Google Translate)