Skip to content

Commit

Permalink
Add size() member to dummy span types (#282)
Browse files Browse the repository at this point in the history
opendigitizer's fails to compile otherwise
  • Loading branch information
Waqar144 authored Feb 22, 2024
1 parent 285630c commit 7f22e21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/include/gnuradio-4.0/BlockTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ struct DummyConsumableSpan {

[[nodiscard]] constexpr iterator begin() const noexcept { return internalSpan.begin(); }
[[nodiscard]] constexpr iterator end() const noexcept { return internalSpan.end(); }
[[nodiscard]] constexpr std::size_t size() const noexcept { return internalSpan.size(); }
operator const std::span<const T>&() const noexcept { return internalSpan; }
operator std::span<const T>&() noexcept { return internalSpan; }
operator std::span<const T>&&() = delete;
Expand All @@ -328,6 +329,7 @@ struct DummyPublishableSpan {

[[nodiscard]] constexpr iterator begin() const noexcept { return internalSpan.begin(); }
[[nodiscard]] constexpr iterator end() const noexcept { return internalSpan.end(); }
[[nodiscard]] constexpr std::size_t size() const noexcept { return internalSpan.size(); }
operator const std::span<T>&() const noexcept { return internalSpan; }
operator std::span<T>&() noexcept { return internalSpan; }

Expand Down

0 comments on commit 7f22e21

Please sign in to comment.