kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
398 stars 65 forks source link

Windows Clang Build Error #334

Closed tobiashienzsch closed 3 months ago

tobiashienzsch commented 3 months ago

Commit 2f5ae3dc2aeab8c296aa5710975cbcad3e56f098 broke clang on Windows. The :: global namespace prefix of ::stderr isn't compatible with the macro. C++ reference says it should be a macro, so we probably need to remove the ::

.../build/_deps/mdspan-src/include\mdspan\../experimental/__p0009_bits\macros.hpp:127:18: error: expected unqualified-id
  127 |   std::fprintf(::stderr, "%s:%u: precondition failure: `%s`\n", file, line, cond);

      |                  ^

C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt_wstdio.h:38:16: note: expanded from macro 'stderr'

   38 | #define stderr (__acrt_iob_func(2))

      |                ^

1 error generated.
dalg24 commented 3 months ago

Do you mind checking that this resolve your issue and opening a PR for it if it does?