Ipc::Mem::FlexibleArray< Item > Class Template Reference

#include <FlexibleArray.h>

Inheritance diagram for Ipc::Mem::FlexibleArray< Item >:
Collaboration diagram for Ipc::Mem::FlexibleArray< Item >:

Public Member Functions

 FlexibleArray (const int capacity)
 
Item & operator[] (const int idx)
 
Item * raw ()
 

Private Attributes

std::byte start_
 the first byte of the first array item More...
 

Detailed Description

template<class Item>
class Ipc::Mem::FlexibleArray< Item >

A "flexible array" of Items inside some shared memory space. A portable equivalent of a "Item items[];" data member. Some compilers such as Clang can only handle flexible arrays of PODs, and the current C++ standard does not allow flexible arrays at all.

Definition at line 26 of file FlexibleArray.h.

Constructor & Destructor Documentation

◆ FlexibleArray()

template<class Item >
Ipc::Mem::FlexibleArray< Item >::FlexibleArray ( const int  capacity)
inlineexplicit

Definition at line 29 of file FlexibleArray.h.

References Ipc::Mem::FlexibleArray< Item >::raw().

Member Function Documentation

◆ operator[]()

template<class Item >
Item & Ipc::Mem::FlexibleArray< Item >::operator[] ( const int  idx)
inline

Definition at line 33 of file FlexibleArray.h.

References Ipc::Mem::FlexibleArray< Item >::raw().

◆ raw()

Member Data Documentation

◆ start_

template<class Item >
std::byte Ipc::Mem::FlexibleArray< Item >::start_
private

Definition at line 38 of file FlexibleArray.h.

Referenced by Ipc::Mem::FlexibleArray< Item >::raw().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors