Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-1393

C++ Rule: declarations of functions defined outside of the class should not be marked as "inline"

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.11
    • Component/s: C++, Rules
    • Labels:
      None

      Description

      See https://isocpp.org/wiki/faq/inline-functions#where-to-put-inline-keyword

      class Foo {
      public:
        void method();  // Best practice: Don't put the inline keyword here
        // ...
      };
      inline void Foo::method()  // Best practice: Put the inline keyword here
      {
        // ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alban.auzeill Alban Auzeill
              Reporter:
              evgeny.mandrikov Evgeny Mandrikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: