diff options
author | Jason Merrill <jason@redhat.com> | 2016-07-15 14:38:23 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-07-15 14:38:23 -0400 |
commit | aa30dfadf3234caa8a29ef23ddc5932101a0e430 (patch) | |
tree | 570594e330f0c11c2307922ac7864b02d6a70bdd /gcc/cp/operators.def | |
parent | 34bbc4c502157fb08e6eba1d09380e2599ec3720 (diff) | |
download | gcc-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.def | 4 |
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) |