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

Wrong syntax error with BOOST_SCOPE_EXIT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • Qt Creator 2.2.1, Qt Creator 2.4.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Qt v4.7.3
      MS Windows XP

    Description

      QtCreator reports a syntax error when using BOOST_SCOPE_EXIT macro. A simple example (do not forget to add boost to the include path):

      #include <iostream>
      #include <boost/scope_exit.hpp>
      
      int main(int argc, char *argv[])
      {
          std::cout << "starting app" << std::endl;
          int dummy;
          {
              BOOST_SCOPE_EXIT((dummy)) {
                  std::cout << "making scope clean-up" << std::endl;
              } BOOST_SCOPE_EXIT_END
              std::cout << "entering scope" << std::endl;
          }
          std::cout << "closing app" << std::endl;
      }
      

      This is a valid C++ code, but QtCreator reports "expected token `;' got `BOOST_PP_FOR_BOOST_PP_NODE_ENTRY_256'. It seems like all the code after this error and till the end of the .cpp is not parsed by QtCreator, i.e. renaming a function, following symbol doesn't work or work incorrect.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            alex_r Alexander Rukletsov
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes