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

login
register
mail settings
Submitter Adam Butcher
Date July 1, 2013, 11:26 p.m.
Message ID <1372721221-6201-3-git-send-email-adam@jessamine.co.uk>
Download mbox | patch
Permalink /patch/256243/
State New
Headers show

Comments

Adam Butcher - July 1, 2013, 11:26 p.m.
---
 gcc/cp/pt.c | 3 +++
 1 file changed, 3 insertions(+)

Patch

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));