mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
WIP
git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@303 f6dd340e-d3f9-0310-b409-bdd246841980
This commit is contained in:
parent
cb6b1c7dfc
commit
b24cb4669f
2 changed files with 4 additions and 2 deletions
|
@ -174,7 +174,7 @@ situation (2):
|
|||
Note that the overloaded tt(copy()) function merely moves the
|
||||
tt(other.text) pointer to the current object's tt(text) pointer followed by
|
||||
reassigning 0 to tt(other.text). tt(Struct Data) suddenly has become
|
||||
emi(move aware) and implements em(move semantics), removing the drawbacks of
|
||||
emi(move-aware) and implements em(move semantics), removing the drawbacks of
|
||||
the previously shown approach:
|
||||
itemization(
|
||||
it() Instead of making a deep copy (which is required in situation (1)),
|
||||
|
|
|
@ -123,7 +123,9 @@ that tt(fun(Class &&)) is called. This can be realized by the following cast:
|
|||
fun(reinterpret_cast<Class &&>(tmp)); // last call!
|
||||
)
|
||||
More often, though the shorthand hi(move) tt(fun(std::move(tmp))) is used,
|
||||
already performing the required cast for us.
|
||||
already performing the required cast for us. tt(Std::move) is indirectly
|
||||
declared by many header files. If no header is already declaring tt(std::move)
|
||||
then include ti(utility).
|
||||
|
||||
It is pointless to provide a function with an rvalue reference return
|
||||
type. The compiler decides whether or not to use an overloaded member
|
||||
|
|
Loading…
Reference in a new issue