diff mbox

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

Message ID 1372721221-6201-3-git-send-email-adam@jessamine.co.uk
State New
Headers show

Commit Message

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

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