Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16086

Refactoring fails for std::string on GCC 5 with C++11 ABI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.2.2
    • Qt Creator 3.6.1, Qt Creator 4.0.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Debian Testing, gcc (Debian 5.3.1-13) 5.3.1 20160323

    Description

      Example code:

      #include <string>
      struct A {
        void test(std::string s);
      };
      

      Right-clicking on "test" and selecting "Refactor" -> "Add Definition Outside Class" results in the following code:

      void A::test(std::__cxx11::string s)
      {
          
      }
      

      Clearly, the type should be "std::string", not "std::__cxx11::string".

      Possible workaround: Disable GCCs C++11 ABI

      QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0

      This issue seems to be closely related to QTCREATORBUG-15461.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kosjar Nikolai Kosjar
            rettichschnidi Schneider
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes