[PATCH 5/6] make get_domminated_by_region return a auto_vec

Jakub Jelinek jakub@redhat.com
Fri Jun 18 10:53:54 GMT 2021

On Fri, Jun 18, 2021 at 12:38:09PM +0200, Richard Biener via Gcc-patches wrote:
> > Yes, as we discussed in the review below, vec is not a good model
> > because (as you note again above) it's constrained by its legacy
> > uses.  The best I think we can do for it is to make it safer to
> > use.
> > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/571622.html
> Which is what Trevors patches do by simply disallowing things
> that do not work at the moment.

I only see
  // You probably don't want to copy a vector, so these are deleted to prevent
  // unintentional use.  If you really need a copy of the vectors contents you
  // can use copy ().
  auto_vec(const auto_vec &) = delete;
  auto_vec &operator= (const auto_vec &) = delete;
on the
template<typename T>
class auto_vec<T, 0> : public vec<T, va_heap>
specialization, but not on the
template<typename T, size_t N = 0>
class auto_vec : public vec<T, va_heap>
template itself.  Shouldn't that one have also the deleted
copy ctor/assignment operator and in addition to that maybe deleted
move ctor/move assignment operator?


More information about the Gcc-patches mailing list