There are some thought experiments that are so common, that it rarely is thought of as a thought experiment, but rather an argument in itself. Its the end of the world, and you and someone else are the last people on the planet.
Usually, the someone else is terribly unattractive, or there are other circumstances that affect your desire to procreate with the other person. But the scenario itself suggests that there is some kind of obligation to continue the human species, since in normal circumstances you would never want to engage in activities that would lead to reproduction with this other person.
So do we have an obligation to continue the human species?
I'm not sure that we do. Typically, when we speak of future generations, we're speaking about an abstract population that will very likely come into being. But, in end of the world scenarios, the future generation will come into being only based on our present actions. Just as I, an individual, have no particular responsibility to have children (arguably, I have some kind of responsibility not to have children because of the state of the environment, and the fact that I live in an industrialized nation... but thats for another time.).
Now I'm a firm believer in context, and in the situation of being the last members of my species, I may have a particular duty to continue the existence of the species. But to say that, implies I have an obligation to the human species as a whole. What kind of obligation is that, and why doesn't it appear on an individual basis in normal circumstances?
The hypothetical position that I am in, is quite akin to the position of God before creation. Before creation, God has really no obligations except to himself and to his species (assuming he has a species). Now to place God into our scenario, he would have to be the last of his species. Does he have an obligation to bring into existence creation? To say that he would have an obligation to himself, is odd. Obligations to oneself are essentially promises to oneself. In any promisory relationship, the person the promise is made to, can release the promiser from the promise. E.g. I promise my wife to take her to the movies, and she's not feeling up to it. So she releases me from the promise. But, if I'm making promises to myself, then I can release myself from the promise. I promise myself that I will exercise today. But I'm not feeling it, so I release myself from the promise. Have I broken the promise? Only if I didn't release myself from the promise and broke it, but why would anyone do that?
So back to the end of the world. I don't have an obligation to myself to continue the existence of the world, and I don't think I have obligations to non-existent people, otherwise I might have an obligation to procreate my children (which I don't believe I have, and I don't think most people believe that they have as well). Its not an obligation to myself (those are meaningless), but it could be one to the species.... but the species consists of myself and the other person. So I have an obligation to myself and the other to procreate. If the other has a similar mindset as myself, then we can release ourselves from the obligation, and not reproduce.