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

            Bug ID: 86773
           Summary: GCC accepts junk before fold expressions
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mickey.veksler at gmail dot com
  Target Milestone: ---

template <typename ... Param>
auto work(Param && ...param)
{
        return ("hi" ... / param);
}

int main()
{
        std::cout << work(1.0, 2.0, 5, 4.0) << "\n";
}


GCC simply ignores the "hi" junk before the fold expression, with no
diagnostics.

Reply via email to