Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #15242

Re: Default move constructor/assignment

From woodbrian77@gmail.com
Newsgroups comp.lang.c++
Subject Re: Default move constructor/assignment
Date 2012-04-07 18:58 -0700
Organization http://groups.google.com
Message-ID <358355.525.1333850294795.JavaMail.geo-discussion-forums@ynbv36> (permalink)
References (4 earlier) <24078035.279.1333643732405.JavaMail.geo-discussion-forums@ynes7> <4f7e7f21$0$4360$7b1e8fa0@news.nbl.fi> <19996601.695.1333779961722.JavaMail.geo-discussion-forums@yndg18> <74febb32-d75d-44d2-956f-d205d5659220@i18g2000vbx.googlegroups.com> <8544443.2471.1333839568503.JavaMail.geo-discussion-forums@ynpp8>

Show all headers | View raw


On Saturday, April 7, 2012 5:59:28 PM UTC-5, woodb...@gmail.com wrote:
> On Saturday, April 7, 2012 12:34:01 PM UTC-5, Howard Hinnant wrote:
> > 
> > I agree too.  However it is good to be aware of the cases that do
> > break, so you can learn to recognize them, and learn how to fix them.
> > 
> 
> Right.
> 
> > The most convincing case I've seen to date is this one:
> > 
> 
> Thanks for the detailed explanation.
> 
> 
> >     Image(Image&& img)
> >         : m_data(std::move(img.m_data)),
> 
> I recall something Anthony Williams wrote about the 
> members of an rvalue reference being rvalue references
> and not needing to use std::move there.  Perhaps you 
> use it as a reminder of what is happening and not 
> because it's really needed?

I read the thread you linked to in the moderated group 
now and the std::move is needed.  It's been a while since
I read what Anthony wrote so don't know if I'm remembering
things wrong or he was mistaken.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-04 09:21 +0000
  Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-05 06:24 +0000
    Re: Default move constructor/assignment Miles Bader <miles@gnu.org> - 2012-04-05 16:48 +0900
    Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-05 01:26 -0700
      Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-05 09:15 +0000
        Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-05 09:35 -0700
          Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-06 05:29 +0000
            Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-06 23:26 -0700
              Re: Default move constructor/assignment Howard Hinnant <howard.hinnant@gmail.com> - 2012-04-07 10:34 -0700
                Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-07 15:59 -0700
                Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-07 18:58 -0700
                Re: Default move constructor/assignment SG <s.gesemann@gmail.com> - 2012-04-10 02:21 -0700

csiph-web