cp-tree.h (cp_expr): Remove copy constructor.

* cp-tree.h (cp_expr): Remove copy constructor.

	* mangle.c (struct releasing_vec): Declare copy constructor.

From-SVN: r260279
This commit is contained in:
Jason Merrill 2018-05-15 20:57:56 -04:00 committed by Jason Merrill
parent 67ea8181df
commit e4a148963e
3 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2018-05-15 Jason Merrill <jason@redhat.com> 2018-05-15 Jason Merrill <jason@redhat.com>
* cp-tree.h (cp_expr): Remove copy constructor.
* mangle.c (struct releasing_vec): Declare copy constructor.
* constexpr.c (cxx_eval_vec_init_1): Pass tf_none if ctx->quiet. * constexpr.c (cxx_eval_vec_init_1): Pass tf_none if ctx->quiet.
PR c++/64372 - CWG 1560, gratuitous lvalue-rvalue conversion in ?: PR c++/64372 - CWG 1560, gratuitous lvalue-rvalue conversion in ?:

View File

@ -59,9 +59,6 @@ public:
cp_expr (tree value, location_t loc): cp_expr (tree value, location_t loc):
m_value (value), m_loc (loc) {} m_value (value), m_loc (loc) {}
cp_expr (const cp_expr &other) :
m_value (other.m_value), m_loc (other.m_loc) {}
/* Implicit conversions to tree. */ /* Implicit conversions to tree. */
operator tree () const { return m_value; } operator tree () const { return m_value; }
tree & operator* () { return m_value; } tree & operator* () { return m_value; }

View File

@ -1555,6 +1555,10 @@ struct releasing_vec
releasing_vec (vec_t *v): v(v) { } releasing_vec (vec_t *v): v(v) { }
releasing_vec (): v(make_tree_vector ()) { } releasing_vec (): v(make_tree_vector ()) { }
/* Copy constructor is deliberately declared but not defined,
copies must always be elided. */
releasing_vec (const releasing_vec &);
vec_t &operator* () const { return *v; } vec_t &operator* () const { return *v; }
vec_t *operator-> () const { return v; } vec_t *operator-> () const { return v; }
vec_t *get () const { return v; } vec_t *get () const { return v; }