Re:The C++20 Naughty and Nice List for Game Devs
by flohofwoe on Monday December 25, 2023 @01:42PM
(#38764935)
extern "C" { ... } unfortunately only turns off C++ name mangling for symbols, it doesn't switch the C++ compiler into "C language mode". Such a feature would be incredibly useful though for mixing C and C++ code in the same source file.
[ Parent
| on HN ]
Re:The C++20 Naughty and Nice List for Game Devs
by pjmlp on Monday December 25, 2023 @02:38PM
(#38765444)
Naturally, that was always its goal, extern "language" {} produces the same linkage model as language.
Even though many only know it with C, Fortran, Pascal and Ada were also common when C++ was gaining adoption.
It was never about being a polyglot compiler.