Intel® oneAPI Threading Building Blocks Developer Guide and API Reference
Construction, destruction, copying
Empty container constructors
enumerable_thread_specific();
Constructs an enumerable_thread_specific where each thread-local element will be default-constructed.
template<typename Finit> explicit enumerable_thread_specific( Finit finit );
Constructs an enumerable_thread_specific such that any thread-local element will be created by copying the result of finit().
explicit enumerable_thread_specific( const T& exemplar );
Constructs an enumerable_thread_specific where each thread-local element will be copy-constructed from exemplar.
explicit enumerable_thread_specific( T&& exemplar );
Constructs an enumerable_thread_specific object, move constructor of T can be used to store exemplar internally; however, thread-local elements are always copy-constructed.
template <typename... Args> enumerable_thread_specific( Args&&... args );
Constructs enumerable_thread_specific such that any thread-local element will be constructed by invoking T(args...).
Copying constructors
enumerable_thread_specific ( const enumerable_thread_specific& other );
template<typename Alloc, ets_key_usage_type Cachetype> enumerable_thread_specific( const enumerable_thread_specific <T, Alloc, Cachetype>& other );
Constructs an enumerable_thread_specific as a copy of other. The values are copy-constructed from the values in other and have same thread correspondence.
Moving constructors
enumerable_thread_specific ( enumerable_thread_specific&& other )
Constructs an enumerable_thread_specific by moving the content of other intact. other is left in an unspecified state, but can be safely destroyed.
template<typename Alloc, ets_key_usage_type Cachetype> enumerable_thread_specific( enumerable_thread_specific <T, Alloc, Cachetype>&& other )
Constructs an enumerable_thread_specific using per-element move construction from the values in other, and keeping their thread correspondence. other is left in an unspecified state, but can be safely destroyed.
Destructor
~enumerable_thread_specific()
Destroys all elements in *this. Destroys any native TLS keys that were created for this instance.
Assignment operators
enumerable_thread_specific& operator=( const enumerable_thread_specific& other );
Copies the content of other to *this. Returns a reference to this*.
template<typename Alloc, ets_key_usage_type Cachetype>
enumerable_thread_specific& operator=( const enumerable_thread_specific<T, Alloc, Cachetype>& other );
Copies the content of other to *this. Returns a reference to this*.
enumerable_thread_specific& operator=( enumerable_thread_specific&& other );
Moves the content of other to *this intact. An other is left in an unspecified state, but can be safely destroyed. Returns a reference to this*.
template<typename Alloc, ets_key_usage_type Cachetype>
enumerable_thread_specific& operator=( enumerable_thread_specific<T, Alloc, Cachetype>&& other );
Moves the content of other to *this using per-element move construction and keeping thread correspondence. An other is left in an unspecified state, but can be safely destroyed. Returns a reference to this*.