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

Failure to pair ) in C++ raw string literal as-you-type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 14.0.2
    • C/C++/Obj-C++ Support
    • None

    Description

      (in the listings below, | marks the cursor position and + type x means the users types that key (x, in this case))

      When typing any scope introducer ((, ", ...), QtC helpfully provides the closer as-you-type:

      const auto s = |               + type "
      const auto s = "|"
      

      However, it doesn't do that for the raw string literal's closing ):

      const auto s = R|               + type "
      const auto s = R"|"             + type (
      const auto s = R"(|"
      

      Expected:

      const auto s = R|               + type "
      const auto s = R"|"             + type (
      const auto s = R"(|)"
      

      This should also work with (and use/copy) a user-provided d-char-seq:

      const auto s = R|               + type "
      const auto s = R"|"             + type -
      const auto s = R"-|"            + type *
      const auto s = R"-*|"           + type (
      const auto s = R"-*(|)-*"
      

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            mmutz Marc Mutz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes