aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/operators.def
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-07-15 14:38:23 -0400
committerJason Merrill <jason@gcc.gnu.org>2016-07-15 14:38:23 -0400
commitaa30dfadf3234caa8a29ef23ddc5932101a0e430 (patch)
tree570594e330f0c11c2307922ac7864b02d6a70bdd /gcc/cp/operators.def
parent34bbc4c502157fb08e6eba1d09380e2599ec3720 (diff)
downloadgcc-aa30dfadf3234caa8a29ef23ddc5932101a0e430.zip
gcc-aa30dfadf3234caa8a29ef23ddc5932101a0e430.tar.gz
gcc-aa30dfadf3234caa8a29ef23ddc5932101a0e430.tar.bz2
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
Diffstat (limited to 'gcc/cp/operators.def')
-rw-r--r--gcc/cp/operators.def4
1 files changed, 4 insertions, 0 deletions
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)