To answer you actual question better, here's an idea to consider.
Make a class that inherits from sf::Drawable and adds Z value functions (e.g. GetZ() and SetZ()). Every frame create an empty std::set. Each frame, when you want to render an object, just insert it's pointer into this set (you'll need to define a less than operator for the pointers based on the Z value). The set should fairly efficiently sort each object (log n time, I believe). At the end of the frame iterate through the set and render each object for real.