I'm writing a simple Command line application on macOS with code using C++, using a API called 'std::to_chars' from charconv
void foo(void)
{
if (__builtin_available(macOS 10.15, *))
{
char buffer[10];
std::to_chars_result tcr = std::to_chars( buffer, buffer+5, 5 );
#pragma unused (tcr)
}else{
return;
}
}
Since Xcode complains main.cpp:19:41: error build: 'to_chars<int, 0>' is unavailable: introduced in macOS 10.15
I wrapped the code with an availability check API in C++, __builtin_available(macOS 10.15, *))
But even with this availability check API, Xcode still failed to compile.
Anyone knows why?
Post
Replies
Boosts
Views
Activity
I followed apple's demo application to create an audio server plugin named NullAudio. However, since the code is written in C with some COM interfaces, it is hard for a Swift Programmer. So I want to attach XCode to the Null Audio Plugin to take a look at the method calls.
I googled and found the audio server plugin maybe debug in this way:
Note the BGMDevice is another audio server plugin they created.
So I followed, xcode attaches to coreaudiod process.
But any breakpoint in the code just go grey, how can I make the break point active?