* cp-tree.h (cp_expr): Remove copy constructor.
* mangle.c (struct releasing_vec): Declare copy constructor.
From-SVN: r260279
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.
PR c++/64372 - CWG 1560, gratuitous lvalue-rvalue conversion in ?:
cp_expr (tree value, location_t 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. */
operator tree () const { return m_value; }
tree & operator* () { return m_value; }
releasing_vec (vec_t *v): v(v) { }
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 *get () const { return v; }