Consider a function like this:
auto&& just(auto&& arg) { return std::forward<decltype(arg)>(arg); }
This will perfect-forward all the references and will return a dead reference when called for a temporary object.
In more details:
struct Something {};
auto something() { return Something{}; }
auto&& ref = just(something()); // ERROR: Here ref refers to already destructed Something.
auto&& hold = something();
auto&& ref = just(hold); // OK: Here ref refers to lifetime-extended Something.
So the question is: how can one define just, so the first call will fail to compile, while the second call will compile?