userver: compiler::ThreadLocalScope< VariableType > Class Template Reference
Loading...
Searching...
No Matches
compiler::ThreadLocalScope< VariableType > Class Template Referencefinal

#include <userver/compiler/thread_local.hpp>

Detailed Description

template<typename VariableType>
class compiler::ThreadLocalScope< VariableType >

The scope that grants access to a thread-local variable.

See also
compiler::ThreadLocal

Definition at line 50 of file thread_local.hpp.

Public Member Functions

 ThreadLocalScope (ThreadLocalScope &&)=delete
 
ThreadLocalScopeoperator= (ThreadLocalScope &&)=delete
 
VariableType & operator* () &noexcept USERVER_IMPL_LIFETIME_BOUND
 Access the thread-local variable.
 
VariableType * operator-> () &noexcept USERVER_IMPL_LIFETIME_BOUND
 Access the thread-local variable.
 

Constructor & Destructor Documentation

◆ ThreadLocalScope()

template<typename VariableType >
compiler::ThreadLocalScope< VariableType >::ThreadLocalScope ( ThreadLocalScope< VariableType > && )
deletenoexcept

Definition at line 161 of file thread_local.hpp.

◆ ~ThreadLocalScope()

template<typename VariableType >
compiler::ThreadLocalScope< VariableType >::~ThreadLocalScope ( )

Definition at line 168 of file thread_local.hpp.

Member Function Documentation

◆ operator*()

template<typename VariableType >
VariableType & compiler::ThreadLocalScope< VariableType >::operator* ( ) &
noexcept

Access the thread-local variable.

Definition at line 175 of file thread_local.hpp.

◆ operator->()

template<typename VariableType >
VariableType * compiler::ThreadLocalScope< VariableType >::operator-> ( ) &
noexcept

Access the thread-local variable.

Definition at line 181 of file thread_local.hpp.


The documentation for this class was generated from the following file: