I tried to use aligned_alloc and it's nowhere to be found. It was included in C11 and C++ 17. I have my C++ Xcode language dialect set for C++17 (it's listed in the drop-down), but the "C++ standard library" drop-down only shows LLVM "with C++ 11 support."
Anybody know what gives here? This is Mac OS 10.14.3 and Xcode 10.1.
Have you set the C language dialect to C11 in addtion to the C++ language dialect?.
The libc++ library, although labeled with "C++11 Support", is used with C++11, C++14, and C++17.
aligned_alloc is defined in stdlib.h for C11. C++11 (and beyond) inherit through cstdlib, which include stdlib.h which includes stdlib.h in C11.