I know that inline functions get copied into the code each time they are referenced. From my current understanding, I think it would be ok to return the address of an rvalue from an inline function since the function is inside the rest of the code and therefore the rvalue belongs to the scope of the caller function. Is this true?
example:
inline int* addressOfNum(int num){
return #
}
int main(){
int* mynum = addressOfNum(9);
// is the answer "11" or "segmentation fault"?
int eleven = *mynum + 2;
}