Here, we're not finding the parameter pack inside the static_assert because
STATIC_ASSERT trees are tcc_exceptional, and we weren't explicitly walking
them in cp_walk_subtrees.
PR c++/99893
gcc/cp/ChangeLog:
* tree.c (cp_walk_subtrees) <case STATIC_ASSERT>: New case.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/static_assert17.C: New test.
}
break;
+ case STATIC_ASSERT:
+ WALK_SUBTREE (STATIC_ASSERT_CONDITION (*tp));
+ WALK_SUBTREE (STATIC_ASSERT_MESSAGE (*tp));
+ break;
+
default:
return NULL_TREE;
}
--- /dev/null
+// PR c++/99893
+// { dg-do compile { target c++11 } }
+
+void f(...);
+
+template<class... Ts>
+void g() {
+ f([] { static_assert(Ts::value, ""); }...);
+}