OSDN Git Service

PR c++/53484
[pf3gnuchains/gcc-fork.git] / gcc / cp / pt.c
index e3d8948..e4631e7 100644 (file)
@@ -20354,10 +20354,9 @@ do_auto_deduction (tree type, tree init, tree auto_node)
   tree decl;
   int val;
 
   tree decl;
   int val;
 
-  if (processing_template_decl
-      && (TREE_TYPE (init) == NULL_TREE
-         || BRACE_ENCLOSED_INITIALIZER_P (init)))
-    /* Not enough information to try this yet.  */
+  if (type_dependent_expression_p (init))
+    /* Defining a subset of type-dependent expressions that we can deduce
+       from ahead of time isn't worth the trouble.  */
     return type;
 
   /* The name of the object being declared shall not appear in the
     return type;
 
   /* The name of the object being declared shall not appear in the