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

S2068: Fix false-negatives on string constructor with default argument (libstdc++)

    XMLWordPrintable

    Details

    • Type: False Negative
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.20
    • Fix Version/s: 6.21
    • Component/s: C++
    • Labels:
      None

      Description

      The issue is not raised if std::string constructor, that is used in initialization from const char* has additional paremeter with default argument. This is the case for the std::string, as the constructor have additional allocator parameter according to standard.

      The issues is not raised on libc++ and msvc lib, because they use freedom to separte this two constructors.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tomasz.kaminski Tomasz Kamiński
              Reporter:
              tomasz.kaminski Tomasz Kamiński
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: