Polymake Template Library (PTL): pm::shared_array< Object, TParams > Class Template Reference
Polymake Template Library (PTL)  4.2
pm::shared_array< Object, TParams > Class Template Reference

Inherits type< mlist_wrap< TParams... >::type, AliasHandlerTag, nop_shared_alias_handler >, and pm::shared_object_secrets.

Collaboration diagram for pm::shared_array< Object, TParams >:

Classes

struct  rep
 Attached objects plus housekeeping. More...
 

Public Member Functions

 shared_array ()
 Create an empty array.
 
 shared_array (size_t n)
 Create an array with n value-initialized elements.
 
 shared_array (const shared_array_placement &place, size_t n)
 Create an array in a preallocated storage.
 
template<typename... Args>
 shared_array (size_t n, Args &&... args)
 
size_t size () const
 the size of the object
 
shared_arrayoperator= (const shared_array &s)
 Detach or destroy the old array, attach the new one.
 

Detailed Description

template<typename Object, typename... TParams>
class pm::shared_array< Object, TParams >

Automatic pointer to a shared data array

It has the same semantics as

See also
shared_object, with the main difference that there are several data objects packed in the array instance that is being shared.

@tmplparam Object type of the object in the array

Constructor & Destructor Documentation

◆ shared_array()

template<typename Object , typename... TParams>
template<typename... Args>
pm::shared_array< Object, TParams >::shared_array ( size_t  n,
Args &&...  args 
)
inline

Create an array with
elements initialized from given data. args either can be a list of arguments suitable for construction of a single element, in which case all elements are constructed identically, or it can be an iterator over a sequence of input values or nested containers thereof, in which case the array elements are constructed by copying or conversion, whatever applies. Note that the input iterator is passed down by reference where it's advanced towards the end of the sequence.


The documentation for this class was generated from the following file:
  • lib/core/include/internal/shared_object.h