summaryrefslogtreecommitdiffhomepage
path: root/c++.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'c++.html.markdown')
-rw-r--r--c++.html.markdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/c++.html.markdown b/c++.html.markdown
index fa80e6d5..26dfe111 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -262,7 +262,10 @@ string retVal = tempObjectFun();
// - the returned object is destroyed
// The returned object is called a temporary object. Temporary objects are
// created whenever a function returns an object, and they are destroyed at the
-// end of the evaluation of the enclosing expression. So in this code:
+// end of the evaluation of the enclosing expression (Well, this is what the
+// standard says, but compilers are allowed to change this behavior. Look up
+// "return value optimization" if you're into this kind of details). So in this
+// code:
foo(bar(tempObjectFun()))
// assuming `foo` and `bar` exist, the object returned from `tempObjectFun` is