I have looked at the implementation of the Rectangle class and I was surprised to find static_cast.
Why is static_cast there?
from SFML 3.0 branch
template <typename T>
constexpr bool Rect<T>::contains(const Vector2<T>& point) const
{
// Not using 'std::min' and 'std::max' to avoid depending on '<algorithm>'
const auto min = [](T a, T b) { return (a < b) ? a : b; };
const auto max = [](T a, T b) { return (a < b) ? b : a; };
// Rectangles with negative dimensions are allowed, so we must handle them correctly
// Compute the real min and max of the rectangle on both axes
const T minX = min(left, static_cast<T>(left + width));
const T maxX = max(left, static_cast<T>(left + width));
const T minY = min(top, static_cast<T>(top + height));
const T maxY = max(top, static_cast<T>(top + height));
return (point.x >= minX) && (point.x < maxX) && (point.y >= minY) && (point.y < maxY);
}