I have some C++ code with a C interface and I'm struggling to imagine how to come in compliance with a few Autosar C++ rules.
For example:
std::string GetAddress(const std::string &clientName);
vs
StatusReturn_t GetAddress(const char *pClientName, char *pAddress, size_t maxAddrLen);
The C++ interface being vaguely compliant and it's C interface runs afoul of A8-4-8 "Output parameters shall not be used." This one could return a struct with a Status and the address. If the interface could live in a C file it might escape the scanner but I have trouble imagining where char * become std::string without violating this rule somewhere.
Second, the C interface can have issues with A20-8-2 or A20-8-3 which is totally incompatible with C callers.