This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for constexpr variable templates


On 07/29/2014 07:56 AM, Braden Obrzut wrote:
@@ -6289,6 +6289,14 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p,
          break;

        default:
+         /* Convert variable template into VAR_DECL. */
+         if (TREE_CODE (postfix_expression) == TEMPLATE_ID_EXPR
+             && variable_template_p (TREE_OPERAND (postfix_expression, 0)))
+           {
+             postfix_expression = finish_template_variable (postfix_expression);
+           }

Why not do this in cp_parser_id_expression?

+         if (DECL_FUNCTION_TEMPLATE_P (tmpl)
+                 && DECL_STATIC_FUNCTION_P (tmpl)

Indentation mismatch.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]