There is such code:
int main() { double d {4.5}; int x {d}; }
I read that in the new version of C ++ 11 there is support for the prohibition of narrowing conversions during initialization. But the compiler does not produce errors, although it should (for I try to convert double
to int
with the syntax of the new version of initialization (using curly brackets), which just prohibits such unsafe conversions.
IDE - DevC ++ 5.11 Compiler - TDM-GCC 4.9.2.
Question: So why there is no support for this new initialization? The compiler is new, it was recently downloaded with the environment.
-pedantic-errors
added. - αλεχολυτ