mdspan icon indicating copy to clipboard operation
mdspan copied to clipboard

Removed template method used

Open huberdavid opened this issue 5 years ago • 5 comments

Get this error when compile benchmarks: ../include/experimental/__p0009_bits/basic_mdspan.hpp(284): error: class "std::integer_sequence<std::size_t, 0UL, 1UL, 2UL>" has no member "__size"

In line basic_mdspan.hpp:103: using __impl = make_index_sequence<sizeof...(Exts)>; however std::index_sequence has no member __size

This was a workaround in 76fecc639cc99c6e0e285c8b47ef373a989f3bc3: // Can't use defaulted parameter in the __impl_impl template because of a bug in MSVC warning C4348.

huberdavid avatar May 22 '20 06:05 huberdavid

I am still seeing this in latest (371250b2341e6196b823337e4ea4d3474c879310 Jun 12), using both gcc-9 and gcc-10.

bd4 avatar Dec 03 '20 04:12 bd4

Same error with clang 9 and 10.

bd4 avatar Dec 03 '20 04:12 bd4

Thanks! I'll take a look. We're in the process of (finally) integrating this in to our production code base, so we're going to need to fix these things now anyway. I suspect this is a problem in the build system. What version of C++ are you configuring with?

dhollman avatar Dec 03 '20 23:12 dhollman

I tried with default, c++14 and c++17. Seems to detect c++20 concepts support if I don't specify, which I am skeptical of... but forcing older did not fix the error.

bd4 avatar Dec 04 '20 01:12 bd4

I have also had this issue when trying to use both the size() and operator()(array) methods of basic_mdspan.

I'm only using gcc and clang, not MSVC, so I "fixed" (bodged) it by undoing the changes in https://github.com/kokkos/mdspan/commit/9baf320edbf10315a9c136ba91a08810dfc3a68c. This also "fixes" a similar problem in layout_stride. It compiles and seems to work for a tiny test case using these methods with gcc-10.1.0 and clang-10.0.0

Clearly this isn't a long-term solution, but could be a viable stop-gap @bd4 @huberdavid until a more robust fix that also covers MSVC is implemented.

JHopeCollins avatar Feb 23 '21 09:02 JHopeCollins

I think this is not an issue anymore gonna close this

crtrott avatar Nov 23 '22 00:11 crtrott