mph icon indicating copy to clipboard operation
mph copied to clipboard

Fix build with libc++

Open zifeitong opened this issue 3 months ago • 0 comments

std::experimental::simd in libc++ is incomplete:

In file included from <source>:1:
/app/raw.githubusercontent.com/qlibs/mph/main/mph:1144:26: error: no member named 'any_of' in namespace 'std::experimental'
 1144 |       std::experimental::any_of(match),
      |                          ^~~~~~
/app/raw.githubusercontent.com/qlibs/mph/main/mph:1145:53: error: no member named 'find_first_set' in namespace 'std::experimental'
 1145 |       result_type(values[index + std::experimental::find_first_set(match)]),
      |                                                     ^~~~~~~~~~~~~~
/app/raw.githubusercontent.com/qlibs/mph/main/mph:1145:75: error: expected ']'
 1145 |       result_type(values[index + std::experimental::find_first_set(match)]),
      |                                                                           ^
/app/raw.githubusercontent.com/qlibs/mph/main/mph:1145:25: note: to match this '['
 1145 |       result_type(values[index + std::experimental::find_first_set(match)]),
      |                         ^

Tests:

  • lib++: https://godbolt.org/z/sodGhYG3q
  • libstdc++: https://godbolt.org/z/3zjYdd4vn

zifeitong avatar Sep 27 '25 17:09 zifeitong