I just wanted to add that the idea of casting from one vector to another just makes it more "ugly":
static_cast<sf::Vector2f>(intVector)
vs
sf::Vector2f(intVector)
I presume by "ugly", you mean more characters...
Casting from a float to an int vector often is also a sign of wrong usage. Why do you need integer positions when you have floating point values?[...]
Just to be clear, there was no conversion from float to int. The original post was about creating a vector from components and the conversion in my reply (from int to float) was in response to their question about conversion.
I agree with you that casting from float to int can be more troublesome than originally expected. 3.9f casted to int would be 3 (as you already mentioned) but even rounding the float first doesn't guarantee it rounding upwards. round(3.9f) might result in a value very slightly below 4 so would still cast to in as 3.
That said, it's possible to fix this:
static_cast<int>(std::round(3.9f) + 0.5f);. Well, that is how I would do it