eclipse-iceoryx / eclipse-iceoryx/iceoryx

cxx::vector support of Capacity 0 and erase by index

Open
#488 14 comments 0 reactions 1 assignee Claimed by @sschnitzer View on GitHub
globex refactoring
Dominant language
C++
Stars
2.2k
Forks
492
Avg merge
18h 57m
Merged PRs (30d)
1

Description

## Brief feature description

1. cxx::vector shall support "0" as Capacity
2. cxx::vector shall allow to erase an element identified by its index, i.e., new method `iterator erase(uint64_t index)`

## Detailed information

1. Support for Capacity 0 makes the cxx::vector implementation more generic. Typically, the capacity is given as configurable compile-time constants. Such a constant might potentially be set to "0", which shall not break compilation.
2. The existing `iterator erase(iterator position)` method assumes that iterators are used. In case the vector is accessed via index, a new `iterator erase(uint64_t index)` method is more convenient.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.