A C++ compiler outputs machine code that runs on a raw cpu if you want it to.
The os providing a virtual cpu is just an optional extra and so irrelevant.
That is not true for someone writing php or js or anything that runs in an interpreter. C/OS/Kernel are not actually the interpreter for C++, or they are, but only in the same way that the bare hardware is. C++ is the final interpeter layer besides assembly.