> > +mgmh::EGLHelper::EGLHelper(EGLHelper&& from) > > + : depth_buffer_bits{from.depth_buffer_bits}, > > + stencil_buffer_bits{from.stencil_buffer_bits}, > > + egl_display{from.egl_display}, > > + egl_config{from.egl_config}, > > + egl_context{from.egl_context}, > > + egl_surface{from.egl_surface}, > > + should_terminate_egl{from.should_terminate_egl} > > +{ > > +} > > > > A long way to write "mgmh::EGLHelper::EGLHelper(EGLHelper&& from) = > default;"? > > No, an incomplete move constructor - it doesn't invalidate the moved-from > object, resulting in the crash.
So why have a move constructor at all?!
A move constructor that promises to behave like a copy constructor is misleading at best.
« Back to merge proposal
> > +mgmh:: EGLHelper: :EGLHelper( EGLHelper& & from) bits{from. depth_buffer_ bits}, buffer_ bits{from. stencil_ buffer_ bits}, from.egl_ display} , from.egl_ config} , from.egl_ context} , from.egl_ surface} , terminate_ egl{from. should_ terminate_ egl} EGLHelper: :EGLHelper( EGLHelper& & from) =
> > + : depth_buffer_
> > + stencil_
> > + egl_display{
> > + egl_config{
> > + egl_context{
> > + egl_surface{
> > + should_
> > +{
> > +}
> >
> > A long way to write "mgmh::
> default;"?
>
> No, an incomplete move constructor - it doesn't invalidate the moved-from
> object, resulting in the crash.
So why have a move constructor at all?!
A move constructor that promises to behave like a copy constructor is misleading at best.