It is quite easy to write a newbie who says that some of his code "shouldn't generate any error" off as a fool or troll after having the error explained yet here I am still offering support.It is easy to just ignore the rest of what you are writing when you start your post with two quite provoking/disparaging statements; you know that, right?
Being a newbie, your opinions regarding how a C++ compiler should behave in relation to the standard is irrelevant. You don't like that? I don't care. Once you have more experience with why the code we are discussing is wrong you'll understand why it must be the way it is.
I don't think that the statement "base_safe_float<float> shouldn't generate any error here" is wrong; I know for a fact that it wrong; it is not an opinion. You don't like that? You'll just have to get over it; if you are going to be a programmer you'll always not understand a lot of things.
Your compiler did no such thing. The conversion between `int' to `float' or `float' to `int' isn't at all the same situation. The compiler has rules to choose between those when considering an implicit conversion that form a "best fit" situation.Apparently my compiler could chose between the two cases and that is actually what matters to me.
No. It should not; I've told you why.If it behaves in one way for float it should behave in the same way for the class I'm creating.
Then do what I told you to do and explicitly cast the zero result (preferably by `static_cast') of a `typedef'.I don't know what is correct behavior and which is not (which you seems to know), but I don't want it to change it when I switch type.