https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89304
Bug ID: 89304 Summary: Compiler runs indefinitely Product: gcc Version: 8.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fiesh at zefix dot tv Target Milestone: --- The following code leads to g++ (and also clang++) running indefinitely. It needs to be compiled with -std=c++17. #include <tuple> template <typename T> void p(T const & v) { } template <typename... T> void f(T &&... args); template <typename... T> void f(std::tuple<T...> const & args); template <typename... T> void f(T &&... args) { auto t = std::make_tuple(args...); f(t); } template <typename... T> void f(std::tuple<T...> const & args) { std::apply([](auto const &... v) { (..., p(v)); }, args); } int main() { f(1., 2, 4); return 0; }