I saw the header present in sysroot and I tried
// file: check_format.cpp
#include <iostream>
#include <version> // feature-test macros live here
#include <format> // attempt to include format if available
int main() {
#if defined(__cpp_lib_format)
std::cout << "__cpp_lib_format is defined: " << __cpp_lib_format << std::endl;
#else
std::cout << "__cpp_lib_format is undefined" << std::endl;
#endif
return 0;
}
And then compiled using
anutosh491@Anutoshs-MacBook-Air clang-wasm-repl % em++ check_format.cpp -std=c++20 -o check_format.js
anutosh491@Anutoshs-MacBook-Air clang-wasm-repl % node check_format.js
__cpp_lib_format is undefined
Am I missing something here ?