diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
| -rw-r--r-- | gcc/cp/cp-tree.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 6ca138d..9c4664c 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -5231,6 +5231,21 @@ struct cp_unevaluated ~cp_unevaluated (); }; +/* The reverse: an RAII class used for nested contexts that are evaluated even + if the enclosing context is not. */ + +struct cp_evaluated +{ + int uneval; + int inhibit; + cp_evaluated () + : uneval(cp_unevaluated_operand), inhibit(c_inhibit_evaluation_warnings) + { cp_unevaluated_operand = c_inhibit_evaluation_warnings = 0; } + ~cp_evaluated () + { cp_unevaluated_operand = uneval; + c_inhibit_evaluation_warnings = inhibit; } +}; + /* in pt.c */ /* These values are used for the `STRICT' parameter to type_unification and |
