From aa30dfadf3234caa8a29ef23ddc5932101a0e430 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 15 Jul 2016 14:38:23 -0400 Subject: PR c++/71711 - mangle C++1z fold-expressions. * operators.def: Add *_FOLD_EXPR. * cp-tree.h (FOLD_EXPR_P): Parenthesize. * mangle.c (write_expression): Handle fold-expressions. * pt.c (tsubst_unary_left_fold, tsubst_binary_left_fold) (tsubst_unary_right_fold, tsubst_binary_right_fold): Handle partial instantiation. From-SVN: r238390 --- gcc/cp/operators.def | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/cp/operators.def') diff --git a/gcc/cp/operators.def b/gcc/cp/operators.def index aa657fa..5b4f1b0 100644 --- a/gcc/cp/operators.def +++ b/gcc/cp/operators.def @@ -155,3 +155,7 @@ DEF_SIMPLE_OPERATOR ("()", CALL_EXPR, "cl", -1) /* Variadic templates extension. */ DEF_SIMPLE_OPERATOR ("...", EXPR_PACK_EXPANSION, "sp", 1) +DEF_SIMPLE_OPERATOR ("... +", UNARY_LEFT_FOLD_EXPR, "fl", 2) +DEF_SIMPLE_OPERATOR ("+ ...", UNARY_RIGHT_FOLD_EXPR, "fr", 2) +DEF_SIMPLE_OPERATOR ("+ ... +", BINARY_LEFT_FOLD_EXPR, "fL", 3) +DEF_SIMPLE_OPERATOR ("+ ... +", BINARY_RIGHT_FOLD_EXPR, "fR", 3) -- cgit v1.1