The question Lifetime Extension of a initializer_list return seemingly is a double XY question. The question title and some of the question body is talking about a problem that OP doesn't actually want to solve (and is an invalid problem, because the code shouldn't compile in conforming compilers.) And the problem OP actually wants to solve is ambiguous.
It could be interpreted two ways:
OP listed two solutions they've thought of that are not ideal. They want an alternative solution that requires mind-reading. One answer did that. This is how I initially interpreted the question, until:
I gained insight from the way the code was written that maybe they were actually trying to solve a different problem. That is until OP wrote a comment that no, the mind-reading solution was what they were after.
In other words, my answer is invalid because it answers the double XY problem and not the hidden question. On one hand, I think my answer is still useful. On the other hand, it's confusing to others who may think that I'm not addressing the problem at all.
So why don't I edit my answer? Because the other answer is good enough as it is and I don't want to duplicate information, or list more broad solutions. What should I do here?