I\'m trying to understand if there is any benefit to returning a const reference. I have a factorial function that normally looks like this:
const
uns
This is invalid. You can't return reference to a local variable.
MSVS C++ compiler even gives the following warning:
main.cc : warning C4172: returning address of local variable or temporary
Not quite sure about GCC, but probably the result would be the same.