Disclaimer: I know purists on either side, C or C++, will not like this. The job needs to get done.
I would like to use as many non-OOP related features of C++ to make my C-like coding (but compiled with a C++ compiler, of course) more enjoyable. The end product should be a C-like library (and an accompanying executable) which is relatively easy to embed in C programs.
What I would terribly need is function overloading, for instance. I guess the client code (written in C) could use libffi or similar to get the mangled named, so the functions can be called.
Other nice features would be default values and perhaps templates.
I wouldn't use any C++ library (only C), no exceptions, no RTTI, and no objects.
- What is the complete list of C++ features which are not in C, which I could use under these restrictions, and what are some common libraries and techniques to make it work as painlessly as possible?
- What should I pay attention to?
I know about the related question, but as I've said, I don't want any glue code (perhaps with the exception of the mangling part, which the client would have to do if he doesn't use C++), and I wouldn't use any OOP features. I am ready to make compromises.