Traditionally C++ hasn't had a stable ABI. Object code from different compilers and even compiler versions has been incompatible. That made it a no-go for system frameworks.
It's the same in Apple land: macOS uses a lot of C++ internally, but it's all wrapped into plain C APIs using an object system called CoreFoundation (which is IMO better than GObject because it was designed for "toll-free bridging" with Objective-C, so there is a low-friction path to a higher level language).
There have been operating systems that built their APIs in C++. BeOS and Symbian are the most notable ones. Both ran into serious trouble with the ABI being tied to a specific compiler, which in practice made it hard to port newer GCC or Clang.
It's the same in Apple land: macOS uses a lot of C++ internally, but it's all wrapped into plain C APIs using an object system called CoreFoundation (which is IMO better than GObject because it was designed for "toll-free bridging" with Objective-C, so there is a low-friction path to a higher level language).
There have been operating systems that built their APIs in C++. BeOS and Symbian are the most notable ones. Both ran into serious trouble with the ABI being tied to a specific compiler, which in practice made it hard to port newer GCC or Clang.