最終更新日時(UTC):
が更新

履歴 編集

function
<atomic>

std::atomic_ref::operator T(C++20)

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;
}

出力

1

バージョン

言語

  • C++20

処理系