https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85708
Bug ID: 85708 Summary: A corrupt fold expression passed compilation Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: violetcrestfall at hotmail dot com Target Milestone: --- Created attachment 44095 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44095&action=edit A corrupt fold expression example that passed compilation with GCC The example attached has passed compilation with GCC 8.1 (on gcc.godbolt.org) and GCC 8.0.1 (r259500). The 5th line in the example: (std::cerr << "Error: " << ... << std::forward<tArgs>(vArgs)) << std::endl; [std::cerr << "Error: "] is not a cast-expression apparently, so this expression should not have been recognized as a fold-expression. The code failed to be compiled with MSVC 19.14 and Clang 6.0.0, which is the correct behavior.