https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77616

            Bug ID: 77616
           Summary: A variadic polymorphic lambda call fails with zero
                    arguments
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ville.voutilainen at gmail dot com
  Target Milestone: ---

Test:

int main()
{
    [](auto...){}();
}

prog.cc: In function 'int main()':
prog.cc:3:19: error: no match for call to '(main()::<lambda(auto:1, ...)>) ()'
     [](auto...){}();
                   ^
prog.cc:3:15: note: candidate: template<class auto:1> main()::<lambda(auto:1,
...)>::operator decltype (((const main()::<lambda(auto:1, ...)>*)((const
main()::<lambda(auto:1, ...)>*
const)0u))->operator()(static_cast<auto:1&&>(<anonymous>))) (*)(auto:1, ...)()
const <deleted>
     [](auto...){}();
               ^
prog.cc:3:15: note:   template argument deduction/substitution failed:
prog.cc:3:19: note:   candidate expects 1 argument, 0 provided
     [](auto...){}();
                   ^
prog.cc:3:15: note: candidate: template<class auto:1> main()::<lambda(auto:1,
...)>
     [](auto...){}();
               ^
prog.cc:3:15: note:   template argument deduction/substitution failed:
prog.cc:3:19: note:   candidate expects 1 argument, 0 provided
     [](auto...){}();
                   ^

Reply via email to