Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-903 Support for the upcoming c++0x
  3. QTCREATORBUG-1452

C++ editor does not recognize lambda function syntax (and maybe other C++0x stuff)

    XMLWordPrintable

Details

    • Sub-task
    • Resolution: Done
    • Not Evaluated
    • None
    • C/C++/Obj-C++ Support
    • None
    • windows gcc

    • 8329d7db943bef3f7929d3802fc31f60e314e179

    Description

      For example, this:

      #include <algorithm>
      
      template <typename Container>
      void delete_clear(Container &c)
      {
          for_each(c.begin(), c.end(), [](typename Container::value_type x){ delete x; } );
          c.clear();
      }
      

      Gets a syntax error at the '[' character, while this is a valid lambda declaration. GCC 4.5/4.6 and MSVC 2010 support them already, so this should not be an error.

      Attachments

        Issue Links

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

          Activity

            People

              raggi Roberto Raggi
              rubenvb Ruben Van Boxem
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes