Search:

Type: Posts; User: Elkvis

Search: Search took 0.05 seconds.

  1. Replies
    22
    Views
    4,801

    you can certainly invoke the move semantics with...

    you can certainly invoke the move semantics with any kind of return, but only a returned pointer or reference of some sort will eliminate the extra copy operation. if you return the object by value,...
  2. Replies
    22
    Views
    4,801

    this is true, however, it could be a way to...

    this is true, however, it could be a way to ensure through the use of only standard C++ techniques that you don't have an unnecessary copy operation. if you make sure that the object you're...
  3. Replies
    22
    Views
    4,801

    I guess I optimistically hoped that the semantics...

    I guess I optimistically hoped that the semantics of returning an r-value reference would allow the object to survive somehow beyond the end of the scope, just long enough to have its data copied. ...
  4. Replies
    22
    Views
    4,801

    in standard C++, returning a temporary is really...

    in standard C++, returning a temporary is really about the only way of doing it cleanly.

    if you are using a compiler that supports the new standard (C++2011), you can return an rvalue reference as...
Results 1 to 4 of 4