Dav1d build failed with c++ stdatomic.h
I'm a member of microsoft vcpkg team. In our internal test, dav1d:x64-windows build failed with following error:
src/ref.h(42): error C2061: syntax error: identifier 'atomic_int'
src/cdf.h(139): error C2061: syntax error: identifier 'atomic_uint'
src/cdf.h(142): error C2143: syntax error: missing ')' before '*'
This issue is caused by a recent PR#2008 on STL: Implement P0943R6 Supporting C Atomics In C++.
After this PR, the stdatomic.h file is added into the MSVC include folder, then the https://code.videolan.org/videolan/dav1d/-/blob/master/meson.build file will find it and use it instead of the custom replacement for MSVC.
line 177 of meson.build:
if not cc.check_header('stdatomic.h')
if cc.get_id() == 'msvc'
# we have a custom replacement for MSVC
stdatomic_dependencies += declare_dependency(
include_directories : include_directories('include/compat/msvc'),
)
Since the above PR is a new feature of C++23, STL will not undo this modification, could you please help fix this issue in dav1d? Thank you!