http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56447



             Bug #: 56447

           Summary: [C++11] Lambda in template has conversion op it

                    shouldn't have

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Keywords: accepts-invalid

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: ja...@gcc.gnu.org





template <class T>

void f()

{

  int i;

  // This lambda should not have a conversion op, since it captures i

  int (*p)() = [=]{ return i; }; // { dg-error "cannot convert" }

}

Reply via email to