Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iox-#2220 Add missing type aliases for STL like containers #2223

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
- Race condition in `PoshRuntime` during shutdown [#2192](https://github.com/eclipse-iceoryx/iceoryx/issues/2192)
- Fix wrong memory orders in SpscFiFo [#2167](https://github.com/eclipse-iceoryx/iceoryx/issues/2167)
- Implement missing copy assignment for expected [#2216](https://github.com/eclipse-iceoryx/iceoryx/issues/2216)
- Add missing type aliases that conform with STL container types [#2220](https://github.com/eclipse-iceoryx/iceoryx/issues/2220)

**Refactoring:**

Expand Down
5 changes: 5 additions & 0 deletions iceoryx_hoofs/container/include/iox/forward_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "iox/assertions.hpp"
#include "iox/uninitialized_array.hpp"

#include <cstddef>
#include <cstdint>
#include <iostream>

Expand Down Expand Up @@ -65,7 +66,11 @@ class forward_list
using iterator = IteratorBase<false>;
using const_iterator = IteratorBase<true>;
using value_type = T;
using reference = T&;
using const_reference = const T&;
using difference_type = std::ptrdiff_t;
using size_type = decltype(Capacity);
using index_type = size_type;

/// @brief constructor for an empty list (of T-types elements)
forward_list() noexcept;
Expand Down
5 changes: 5 additions & 0 deletions iceoryx_hoofs/container/include/iox/list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "iox/assertions.hpp"
#include "iox/uninitialized_array.hpp"

#include <cstddef>
#include <cstdint>
#include <iostream>

Expand Down Expand Up @@ -66,7 +67,11 @@ class list
using iterator = IteratorBase<false>;
using const_iterator = IteratorBase<true>;
using value_type = T;
using reference = T&;
using const_reference = const T&;
using difference_type = std::ptrdiff_t;
using size_type = decltype(Capacity);
using index_type = size_type;

/// @brief constructor for an empty list (of T-types elements)
list() noexcept;
Expand Down
6 changes: 6 additions & 0 deletions iceoryx_hoofs/container/include/iox/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "iox/uninitialized_array.hpp"

#include <algorithm>
#include <cstddef>
#include <cstdint>

namespace iox
Expand All @@ -40,7 +41,12 @@ class vector final
public:
using value_type = T;
using iterator = T*;
using reference = T&;
using const_iterator = const T*;
using const_reference = const T&;
using difference_type = std::ptrdiff_t;
using size_type = decltype(Capacity);
using index_type = size_type;

/// @brief creates an empty vector
vector() noexcept = default;
Expand Down
5 changes: 5 additions & 0 deletions iceoryx_hoofs/vocabulary/include/iox/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <limits>
Expand Down Expand Up @@ -224,6 +225,10 @@ class span final : public detail::span_storage<Extent>
using reference = T&;
using iterator = span_iterator<T>;
using reverse_iterator = std::reverse_iterator<iterator>;
using const_iterator = const T*;
using const_reference = const T&;
using size_type = decltype(Extent);
using index_type = size_type;
static constexpr uint64_t extent = Extent;

// constructors, copy, assignment, and destructor
Expand Down
Loading