Questions tagged [apple-clang]

5 questions
3
votes
1 answer

clang++ unable to recognize 'nullptr' without flag

I am running: Apple clang version 14.0.0 (clang-1400.0.29.202) Target: x86_64-apple-darwin22.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin when I run: clang++ *.cpp -o test, I get: identifier = nullptr; …
user18348324
  • 244
  • 10
1
vote
1 answer

std::ranges::any_of fails when compiling with Apple Clang 14.0

When I compile my program I get this error: error: no member named 'any_of' in namespace 'std::ranges'. However, I do include all the necessary headers (e.g. algorithm). I use c++20 standard and my compiler version is Apple Clang 14.0. Why do I get…
riigs
  • 111
  • 8
0
votes
2 answers

Why can't the template type be inferred in this C++ function template?

Given the two function templates below: template void gorp(T*, std::function) { } template void klop(T*, std::function) { } The function klop() works as I expect, but gorp() does not: int x =…
Mustang
  • 363
  • 2
  • 9
0
votes
1 answer

Why can't I suppress warnings while compiling GDB for Apple Silicon?

I have a new Apple M2 MacBook Pro issued by my new job on which our toolchain requires the use of GDB. Since GDB is not pre compiled for Apple Silicon, I have attempted to compile the GDB as a Cross-debugger for a new ARM® Cortex®-M33-based SoC. I…
Shortribs
  • 3
  • 1
0
votes
1 answer

consteval broken? on Apple clang++

What doe the diagnostic below mean? I do not understand how a call to a correct consteval function with no arguments can possibly be anything other than a constant expression. #include template struct X { consteval static int get()…
Yttrill
  • 4,725
  • 1
  • 20
  • 29