auto view3 = myObject.getCopy()[42].getView(); // not safe, copy is destroyed
AFAIK you can say that a rvalue should not return a reference by using ref-qualified member functions. View getView() const & { return v;}
_______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development