So why double to float conversion is implicit ?
codephantom
me at noyb.com
Tue Oct 24 01:22:57 UTC 2017
On Monday, 23 October 2017 at 21:51:24 UTC, Basile B. wrote:
> ---
> /**
> * Wraps a floating point type that doesn't follow D permissive
> float conversion
> * rules.
> *
> * In D, as in C++, implicit conversion from $(D double) to $(D
> float) is allowed,
> * leading to a possible precision loss. This can't happen when
> using this wrapper.
> */
Want to hammer in a nail.. just go ahead and use a bulldozer ;-)
Simple things should be simple.
I cannot see how the simplest solution would be any other than to
have a compiler option for warning you of implicit conversions.
More information about the Digitalmars-d
mailing list