kcat / openal-soft

OpenAL Soft is a software implementation of the OpenAL 3D audio API.
Other
2.22k stars 536 forks source link

error: member reference base type 'al::span' is not a structure or union #1064

Open ryandesign opened 2 days ago

ryandesign commented 2 days ago

openal-soft 1.24.0 doesn't build on macOS 10.15:

alc/alu.cpp:2148:9: error: member reference base type 'al::span' is not a structure or union
        .subspan(Offset*FrameStep);
        ^~~~~~~~
alc/alu.cpp:2179:79: error: member reference base type 'al::span' is not a structure or union
        const auto dst = al::span{static_cast<T*>(dstbuf), Offset+SamplesToDo}.subspan(Offset);
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Full build log: https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/200661/steps/install-port/logs/stdio

It builds on macOS 12 and later.

This is a regression; 1.23.1 didn't have this problem.

kcat commented 2 days ago

Not sure why this is failing. It seems to not recognize al::span{...} as creating a span object on those lines, but similar lines like al::span{*srcbuf}.first(SamplesToDo) right above the latter on line 2178 doesn't result in an error. Might need a newer compiler with better C++17 conformance.