1

I've tried to use g++ and clang++, I've tried various c++ versions with the -std flag. I have tried reading the charconv file to see what the issue may be.

I could use some help, I'm really unsure of how to move forward.

I have MacOS 13.3 and clang version Apple clang version 15.0.0 (clang-1500.0.28.1.1)

edit:

Minimal Code:

#include <charconv>
using namespace std;

char buf[30] = {0};

int main()
{
  const auto to_result = to_chars(buf, buf+30, 32.3, chars_format::scientific, 5);
  return 1;
}

Minimal build:

> clang++ test.cpp -std=c++17
test.cpp:7:26: error: 'to_chars' is unavailable: introduced in macOS 13.3
  const auto to_result = to_chars(buf, buf+30, 32.3, chars_format::scientific, 5);
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/charconv:815:17: note: 'to_chars' has been explicitly marked unavailable here
to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __precision);
                ^
1 error generated.


Adam Bujak
  • 63
  • 7

1 Answers1

1

Thanks to @Jarod42 - the answer was adding -mmacosx-version-min=13.3

Adam Bujak
  • 63
  • 7