[PATCH 2/4] [lambda] [polymorphic] Support generic lambdas in templates.

Adam Butcher adam@jessamine.co.uk
Mon Jul 1 23:27:00 GMT 2013


---
 gcc/cp/pt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 3847a1d..fbdd8ec6 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -18847,6 +18847,9 @@ instantiate_decl (tree d, int defer_ok,
   tree fn_context;
   bool nested;
 
+  if (TREE_CODE (d) == TEMPLATE_DECL)
+    return d;
+
   /* This function should only be used to instantiate templates for
      functions and static member variables.  */
   gcc_assert (VAR_OR_FUNCTION_DECL_P (d));
-- 
1.8.3



More information about the Gcc-patches mailing list