I dislike C++ but ... some nice functions are available in C++ only.
Calling them from C is a problem because of the parameter passing convention (th hidden first argument 'this').
I suppose it should not be very difficult to have a function attribute __cppcall in addition to __cdecl, __fastcall, __stdcall.
Is that a stupid suggestion?
Not clear what is the point.
C++ functions generally are __stdcall which first argument is a pointer to the class that is added transparently from compiler which knows the class the function belongs to.
In plain C the new function specifier what should be for? Without the whole C++ infrastructure what the compiler is supposed to do differently from the other specifiers?
Quote from: henrin on September 09, 2022, 03:34:39 PM
I dislike C++ but ... some nice functions are available in C++ only.
Calling them from C is a problem because of the parameter passing convention (th hidden first argument 'this').
Maybe this forum thread will be helpful to you:
https://forum.pellesc.de/index.php?topic=10573.0
John Z