STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Related Functions
stapl::immutable_range_wrapper< Iterator, T > Class Template Reference

Wraps a reference to a temporarily immutable range of objects. More...

Related Functions

(Note that these are not member functions.)

template<typename InputIterator >
immutable_range_wrapper< InputIterator > make_immutable_range (InputIterator first, InputIterator last) noexcept
 Creates a wrapper over the immutable range [first, last). More...
 
template<typename InputIterator , typename Size >
immutable_range_wrapper< InputIterator > make_immutable_range_n (InputIterator first, const Size count) noexcept
 Creates a wrapper over the immutable range [first, first + n). More...
 

Detailed Description

template<typename Iterator, typename T>
class stapl::immutable_range_wrapper< Iterator, T >

Wraps a reference to a temporarily immutable range of objects.

Template Parameters
IteratorContainer iterator type.

The part of container that has been declared immutable may be passed by reference when communication happens in shared memory. The container or the objects in the range must not be deleted or mutated until all immutable_range_wrapper objects to the container have been deleted. This is commonly guaranteed with synchronization.

Once all the immutable_reference_wrapper objects have been destroyed, then the referenced containers and its stored objects can be mutated or deleted.

See also
range_wrapper

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