jeudi 18 août 2016

Move assignment/construct in C++

Consider

 class A
  {
    array<double, 10> array;
    double &a5;
    A():a5(array.at(5))
    {}
  };

It feels like the move assignment or move constructor on this class would make the member a5 invalid? Is that correct? is there a way around? Thanks

Aucun commentaire:

Enregistrer un commentaire