I have a function:
void AddImage(const Image &im);
This function does not need image to be modifiable, but it stores the image a const reference to be used later. Thus, this function should not allow temporaries. Without any precaution the following works:
Image GetImage();
...
AddImage(GetImage());
Is there a way to prevent this function call?