Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>does std::is_move_constructible::value == true implies that T has a usable move constructor?</p> </blockquote> <p>No. It states that you can <a href="http://en.cppreference.com/w/cpp/concept/MoveConstructible" rel="noreferrer">take an rvalue expression of the object type and construct an object from it</a>. Whether this uses the move constructor or the copy constructor is not relevant to this trait.</p> <blockquote> <p>is f2 move constructed ?</p> </blockquote> <p>Yes.</p> <blockquote> <p>if so, shouldn't the rvalue be invalidated?</p> </blockquote> <p>No. That's not how movement works.</p> <blockquote> <p>how can I know if instances of a class can be properly move-constructed(invalidate the old one)?</p> </blockquote> <p>That is not any definition of "properly move-constructed" that exists. If you want to "invalidate the old one", then you will have to do that yourself.</p> <p>Move construction generally guarantees <em>nothing</em> about the state of the old object. It will be in a valid but undefined state. Such state very much can be "the same as it was before". Move construction for a pointer is the same as copying the pointer.</p> <p>If you want to "invalidate" after a move, then you need to write your own move constructor that explicitly does that.</p> <blockquote> <p>(I'm using VS11)</p> </blockquote> <p>Then you have no compiler-generated move constructors <em>at all</em>. Not that it would matter, since the move and copy constructors for pointers both do the same thing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload