4 ms·
C++ is not a superset of C, therefore using C as C++ needs porting. It's fine if you consciously restrict yourself to C++-compatible subset of C (GCC warning -W
by sanxiyn 15y ago
C++ is not a superset of C, therefore using C as C++ needs porting. It's fine if you consciously restrict yourself to C++-compatible subset of C (GCC warning -Wc++-compat can help you), but if you don't it can take a significant effort.
For a realistic case of compiling large C codebase not written in C++-compatible subset of C as C++, take a look at GCC. I think it took something like 6 months to compile GCC as C++ regression-free.
http://gcc.gnu.org/wiki/gcc-in-cxx http://gcc.gnu.org/wiki/gcc-in-cxx