PR c++/60605
* pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
From-SVN: r211754
+2014-06-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/60605
+ * pt.c (check_default_tmpl_args): Check DECL_LOCAL_FUNCTION_P.
+
2014-06-15 Jason Merrill <jason@redhat.com>
PR c++/61488
in the template-parameter-list of the definition of a member of a
class template. */
- if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL)
+ if (TREE_CODE (CP_DECL_CONTEXT (decl)) == FUNCTION_DECL
+ || (TREE_CODE (decl) == FUNCTION_DECL && DECL_LOCAL_FUNCTION_P (decl)))
/* You can't have a function template declaration in a local
scope, nor you can you define a member of a class template in a
local scope. */
--- /dev/null
+// PR c++/60605
+
+template <typename T = int>
+struct Foo {
+ void bar() {
+ void bug();
+ }
+};