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

Wrong warning for initializer_list in the operator()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • Qt Creator 2.8.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Windows 7, Mingw gcc 4.8.0

    Description

      template <class T>
      struct A {
      
      };
      
      struct B{
      	template <class T>
      	int operator()(A<T>){ return 1; }
      };
      
      int main(int , char**){
      	B b;
      	b(A<int>{}); // <-- Wrong warning appears here, which is "expected token ; got int"
      }
      

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            sungmin817 Sungmin Hwang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes