3 ms·
For single-file libraries (declaration and implementation in one header) it's sometimes more convenient to include the header implementation into a C++ file (an
by flohofwoe 7y ago
For single-file libraries (declaration and implementation in one header) it's sometimes more convenient to include the header implementation into a C++ file (and not compile the implementation in a separate C file).
Also, compiling C code in C++ mode might trigger a couple more warnings which are actually bugs.
But these are the only reason I can think of compiling C code as C++.