Although there's no explicit decleration of a assignment operator it's still there since there's an copy constructor.
There should be a Vector2d typedef for Vector2<double> too.I guess it's not nessecary since it's not use internally for SFML, if you need it you can typedef it yourself. ;)
All mouse events should have attribute Vector2 position instead of two fields x and y.I'd be interessted in hearing what the reason is for not providing it.
There should be additional field prevPos in MouseMoveEvent.As said above, the events aren't just arbitrary and they aren't something that comes from SFML, it's the OS that shedules those events and there just is no prevPos. And implementing one on your own isn't that hard... ;)
One of the problems with using Vector2 in the events (instead of two fields x and y) is the use of unions. IIRC, Vector2 does not have a trivial default constructor, and so cannot be in a union.
So Vector2 should have a trivial default constructor.Do you even know what it means? :P
New suggestion:Anything that breaks the public API won't be discussed until I start working on SFML 3.
I think class sf::Shape should have a method "bool contains(Vector2 point)" to check if a point is contained.
And maybe it should be separated Shape and DrawableShape. Like a Rect<T> and RectangleShape. It's to be discussed.
Do you even know what it means? :PSorry, my mistake. I didn't know trivial constructor is something different than default constructor.
So, could I ask why something that don't have trivial contructor can't be in union?Because the C++ standard says so. If I remember correctly, this rule was removed from the new C++11 standard.
One of the problems with using Vector2 in the events (instead of two fields x and y) is the use of unions. IIRC, Vector2 does not have a trivial default constructor, and so cannot be in a union.It's an annoying technical restriction, but also shows the drawbacks of C relicts like unions. Maybe, some day there will be another approach for events, but it might be less simple...
I think class sf::Shape should have a method "bool contains(Vector2 point)" to check if a point is contained.This requires a more complex geometry algorithm, I don't think it should be part of SFML. But you can easily achieve that with Boost.Geometry, for example.
Although there's no explicit decleration of a assignment operator it's still there since there's an copy constructor. ;)The copy assignment operator is implicitly generated by the compiler, it doesn't depend on the copy constructor.
union test {sf::Vector2f test;};