Closed dhebbeker closed 9 months ago
I have a fix that I will push very soon.
Thank you!
Actually, I may have been too hasty. I've been working on #754, not this one. What was your suggested fix?
You are correct, span(TContainer& a)
works fine for std
& etl
arrays.
I would have removed span(etl::array<U, N>& a)
. But I see you did this already in 01d96609cf5193f9a5b8f90cd8a1a23a5ea05631 š
I tested that commit with the IAR compiler mentioned above. The code (same as the one referenced in the description) now compiles without compiler errors š„³
š Thank you!
Fixed 20.38.2
I try to construct a
etl::span
from anetl::array
. This shouldn't be any issue as an appropriate constructor exists.I have an example on Compiler Explorer which compiles successfully. It uses
In short it does
Now with the compiler I have to use I get this error:
The problem seems to be that IAR's overload resolution recognizes both constructor candidates as equally good during overload resolution.
Before suggesting a patch I wonder: Why are there both definitions:
span(etl::array<U, N>& a)
in line 534 andspan(TContainer& a)
in line 592The latter does cover the first case equally well?
I think the code is currently correct as it is. But it contains (unnecessary?) overloads which the IAR chokes on.