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

Update S1749: "const" should be placed before type name but after "typedef"

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: Rules
    • Labels:
      None

      Description

      As a follow-up after discussion of test cases for CPP-1562:

      int const * const p = nullptr; // bad
      const int * const p = nullptr; // ok
      

      Also see https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#nl26-use-conventional-const-notation

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Due:
                Created:
                Updated:
                Resolved: