https://nuttx.apache.org/docs/latest/guides/cpp_cmake.html states:
Using the ‘build as a library’ procedure of NuttX, it is possible to build NuttX applications using C++ language and also the cmake build tool.
This is not correct, at least on Ubuntu "jammy" or "" (toolchain Ubuntu (deb) as per Installing/Toolchain).
Using pristine git checkouts (but "download stable release" fares no better), plus make distclean, then following the instructions to the word, there are multiple obvious issues.
The include files cstdio and string are not found.
The exported tar archive does not contain the libs board, gcc (IIRC), supc++.
At least the sim target should be supported for this out-of-tree CMake-based build procedure and documented in the step-by-step tutorial style.
With the later C++ releases, more exactly the standard library, I think they are a great showcase for the POSIX support in NUTTX.