Skip to content

Implement some modm containers as wrappers of standard library types#1195

Merged
salkinium merged 4 commits intomodm-io:developfrom
chris-durand:containers_std_lib
Jul 21, 2024
Merged

Implement some modm containers as wrappers of standard library types#1195
salkinium merged 4 commits intomodm-io:developfrom
chris-durand:containers_std_lib

Conversation

@chris-durand
Copy link
Member

Subset of #1020

  • Implement modm::Pair using std::pair
  • Implement modm::*List using std::list
  • Implement modm::DynamicArray using std::vector

There is no direct equivalent of modm::LinkedList in the standard library. Thus, it is also implemented as a doubly-linked list. std::forward_list is not directly usable because it can't append to both ends of the list in O(1) and doesn't track the size.

Copy link
Member

@salkinium salkinium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@salkinium salkinium added this to the 2024q3 milestone Jul 21, 2024
@salkinium salkinium merged commit 5fcd015 into modm-io:develop Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants