Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the "static inline" declarator #205

Open
chirsz-ever opened this issue Sep 17, 2021 · 3 comments
Open

Remove the "static inline" declarator #205

chirsz-ever opened this issue Sep 17, 2021 · 3 comments

Comments

@chirsz-ever
Copy link

It looks like unnecessary, and makes the source rejected by compilers that do not support C99, for example, Visual Studio 2012.

@chirsz-ever
Copy link
Author

If you think that's good, I could make a PR.

@cppguru
Copy link

cppguru commented Sep 17, 2021

I know this will sound bad but please please DO NOT do that. You can make that change in your fork, most git stuff is smart enough to be able to keep that change intact as you take the very rarely occurring updates. VS 2012 is an ancient product. We should not decrease the quality of the code to support such systems. It is not unnecessary BTW. It removes symbols that matters a lot for for large scale systems, the inline keyword also changes the semantics as far as I understand.

C99 is 22 years old now. So the only change that makes sense to me in this regard (if we were to change anything to support a obsolete products) is to add conditional compilation (#if !defined(_MSVC_VER) || _MSVC_VER > 1?00) around the static inline stuff.

I know I sound like a j3rk, it is a birth defect, I apologize. I am saying that anything that does not support C99 is obsolete because even the I-don't-want-to-tocuh-it-with-a-10-foot-pole old big iron compilers (IBM AIX, Oracle Sun Studio) that can't even do C++03 right support C99 well enough for this code for ages.

@chirsz-ever Would that #if thing be something you could live with? (Of course I don't make the decisions here. I am just trying to find a solution that works for everyone.) The other possibility would be to make a dedicated configuration macro so you could -DULFJACK_RYU_USE_NO_STATIC_INLINE so anyone can control it any way they want.

@chirsz-ever
Copy link
Author

I'm not a conservative and I like modern C, but it might be too radical for me to use so many static inline functions.

The idea of conditional compilation looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants