3 ms·
The title says "C/C++", but the sample code is C++, and I can't find any mention of support for "inline namespace" in C. Are there C compilers that support it
by nkurz 11y ago
The title says "C/C++", but the sample code is C++, and I can't find any mention of support for "inline namespace" in C. Are there C compilers that support it as an extension?
- klodolph 11y agoNo, the post says "or C-style code", which is presumably just C++ when you aren't using classes or templates or something like that.
- _kst_ 11y agoI wouldn't call that "C-style code". Namespaces are a C++-specific feature, and inline namespaces were introduced in C++-11. C has never had either feature.
- dang 11y agoOK we took out the "C/" bit above.
- dchichkov 11y agoThank you. Yes - I forgot that there are no namespaces in C. Still, it does works for an approximation of 'C-style code' (no templates, virtual functions, etc).