Closed pbarone-latai closed 7 months ago
It seems the span
has not enough tests. I guess the check for a nullptr
should only be done when the It
and End
are pointer types ... and event then the check is wrong. Can you create a patch?
I can definitely add a patch and some unit tests. I'm not entirely sure I understand the intent of the original assert though. My suggestion would be to change it to simply ...
assert(begin <= end);
Is that acceptable?
That should be fine. I'm also not sure why there can be different types for the begin and end iterator. I know that the STL allows such things but it is not possible with our implementation. I would also remove that.
@elBoberido https://github.com/eclipse-iceoryx/iceoryx/pull/2255 is ready for review
Required information
Operating system: Ubuntu 20.04.6 LTS
Compiler version: Clang 11
Eclipse iceoryx version: master
Observed result or behaviour: The following assert statement does not build ... https://github.com/eclipse-iceoryx/iceoryx/blob/b5050251f17cf390652ad6c0a76fcff23296186a/iceoryx_hoofs/vocabulary/include/iox/detail/span.inl#L58-L64
Error:
Expected result or behaviour: Test above should compile
Conditions where it occurred / Performed steps: See above
Additional helpful information