The true solution would be a template based on std::is_integral and SFINAE or tag-dispatching. But I don't really like that for something so simple (and I'm sure Laurent does so even less )
Why would it be an issue for something so simple? It's a simple problem, so why not use a simple solution? (minus the waiting for C++11/14/17 though)
For now, what about an implicit cast to
sf::Int64? Though, an overload for
operator= (or overloaded constructor) would be needed as well.
Here's what I thought:
Time& operator=(Int64 i);
operator Int64() const;
Then that would allow arithmetic with whatever
sf::Int64 can work with, and since
sf::Time uses
sf::Int64 internally, it
should(?) work out.
That
would allow people to do
sf::Time a(5) and wanting 5 seconds, but I think that would be their fault for not reading the docs on what time unit the constructor expects. And I don't
think that this would cause any compatibility issues (correct me if I'm wrong though!).