Skip to content

Remove the "static inline" declarator #205

Description

@chirsz-ever

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

Activity

  1. chirsz-ever commented on Sep 17, 2021

    @chirsz-ever
    Author

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

  2. cppguru commented on Sep 17, 2021

    @cppguru

    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.

  3. chirsz-ever commented on Sep 18, 2021

    @chirsz-ever
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions