Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 701 Bytes

File metadata and controls

53 lines (39 loc) · 701 Bytes

operator T

  • atomic[meta header]
  • std[meta namespace]
  • atomic_ref[meta class]
  • function[meta id-type]
  • cpp20[meta cpp]
operator T() const noexcept;

概要

Tへの暗黙の型変換

戻り値

load()

例外

投げない

#include <iostream>
#include <atomic>

int main()
{
  int value = 1;
  std::atomic_ref<int> x{value};

  int n = x;
  std::cout << n << std::endl;
}
  • int n = x;[color ff0000]

出力

1

バージョン

言語

  • C++20

処理系