diff options
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e814bc9..970296d 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -873,8 +873,9 @@ struct named_decl_hash : ggc_remove <tree> /* Simplified unique_ptr clone to release a tree vec on exit. */ -struct releasing_vec +class releasing_vec { +public: typedef vec<tree, va_gc> vec_t; releasing_vec (vec_t *v): v(v) { } @@ -1728,8 +1729,9 @@ extern GTY(()) struct saved_scope *scope_chain; /* RAII sentinel to handle clearing processing_template_decl and restoring it when done. */ -struct processing_template_decl_sentinel +class processing_template_decl_sentinel { +public: int saved; processing_template_decl_sentinel (bool reset = true) : saved (processing_template_decl) @@ -1746,8 +1748,9 @@ struct processing_template_decl_sentinel /* RAII sentinel to disable certain warnings during template substitution and elsewhere. */ -struct warning_sentinel +class warning_sentinel { +public: int &flag; int val; warning_sentinel(int& flag, bool suppress=true) @@ -5267,8 +5270,9 @@ extern int cp_unevaluated_operand; /* RAII class used to inhibit the evaluation of operands during parsing and template instantiation. Evaluation warnings are also inhibited. */ -struct cp_unevaluated +class cp_unevaluated { +public: cp_unevaluated (); ~cp_unevaluated (); }; @@ -5276,8 +5280,9 @@ struct cp_unevaluated /* The reverse: an RAII class used for nested contexts that are evaluated even if the enclosing context is not. */ -struct cp_evaluated +class cp_evaluated { +public: int uneval; int inhibit; cp_evaluated () @@ -5304,8 +5309,9 @@ enum unification_kind_t { // specializations. When the stack goes out of scope, the // previous pointer map is restored. enum lss_policy { lss_blank, lss_copy }; -struct local_specialization_stack +class local_specialization_stack { +public: local_specialization_stack (lss_policy = lss_blank); ~local_specialization_stack (); @@ -6973,8 +6979,9 @@ extern bool perform_or_defer_access_check (tree, tree, tree, /* RAII sentinel to ensures that deferred access checks are popped before a function returns. */ -struct deferring_access_check_sentinel +class deferring_access_check_sentinel { +public: deferring_access_check_sentinel (enum deferring_kind kind = dk_deferred) { push_deferring_access_checks (kind); |