Namespaces
Variants

std::atomic<T>:: operator T

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
operator T ( ) const noexcept ;
(1) (C++11부터)
operator T ( ) const volatile noexcept ;
(2) (C++11부터)

원자 변수의 현재 값을 원자적으로 로드하여 반환합니다. 다음과 동일합니다: load ( ) .

다음 경우에 사용이 권장되지 않습니다: std:: atomic < T > :: is_always_lock_free false 이고 오버로드 (2) 가 오버로드 해결에 참여하는 경우입니다.

(since C++20)

매개변수

(없음)

반환값

원자 변수의 현재 값.

참고 항목

원자적 객체의 값을 원자적으로 획득합니다
(public member function)