I need to write a class whose constructor takes a constant reference to a object and stores it locally.
In order to avoid most common mistakes I can foresee, I'd like to only accept references to non-temporary (ie: references to lvalues).
How can I write a function that takes constant references to non-temporary only?
Of course even a non-temporary could go out of scope and thus break my class behavior, but I believe that by disallowing temporary references I will avoid most mistakes.