object_getClassName(id _Nullable obj)
(defined in objc.h) determines if obj is an objC-Class. So the answer actually depends if your C++ library will access objC objects or not. Usually its the other way around, often you will access c++ objects in objC and pass them around or change them with the help of your c++ library. When you need to detect if c++class exists you can go this way (see link) nicely explained.
https://devblogs.microsoft.com/oldnewthing/20190710-00/?p=102678
or stick with some help of stackoverflow users here.
Detect if a type exists in C++
or even better go this way
How to detect existence of a class using SFINAE?
or you wanna go this way.
#include <iostream>
#include <type_traits>
class YourLovelyClass {
//constructor..
//destructor..
// ... etc-pp ...
};
std::is_class<YourLovelyClass>::value
// should return true
but you see with this you can not compile if the class does not exist in your namespace or library which is why the other solutions prefer the Template feature of cpp.