------- Comment #11 from pinskia at gcc dot gnu dot org  2008-12-30 01:40 
-------
Patch which I am testing:
Index: pt.c
===================================================================
--- pt.c        (revision 142951)
+++ pt.c        (working copy)
@@ -4626,6 +4626,13 @@ convert_nontype_argument (tree type, tre
       expr = perform_qualification_conversions (type, expr);
       if (expr == error_mark_node)
        return expr;
+      if (TREE_CODE (expr) != PTRMEM_CST)
+        {
+         error ("%qE is not a valid template argument for type %qT "
+                "because it not a pointer-to-member of the form `&X::Y'",
+                expr, type);
+         return NULL_TREE;
+       }
     }
   /* A template non-type parameter must be one of the above.  */
   else


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37093

Reply via email to