You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are useful in C header files in allowing C++ programs to use C functions, by specifying those functions with C linkage.
However, although this is tolerable when it comes to headers, it shouldn't be used in source files. My source files aren't written with the intention of the code in them being 100% compatible with C++, so I should not put anyone under any illusion that they can be compiled with a C++ compiler (even if that might work).
TL; DR; Make it clear that the library intends to be used by C++ programs, but that the library itself should still be compiled as C.
The text was updated successfully, but these errors were encountered:
Chunks of code like this:
are useful in C header files in allowing C++ programs to use C functions, by specifying those functions with C linkage.
However, although this is tolerable when it comes to headers, it shouldn't be used in source files. My source files aren't written with the intention of the code in them being 100% compatible with C++, so I should not put anyone under any illusion that they can be compiled with a C++ compiler (even if that might work).
TL; DR; Make it clear that the library intends to be used by C++ programs, but that the library itself should still be compiled as C.
The text was updated successfully, but these errors were encountered: