I am studying C++ from C++ Primer by Josée Lajoie and Stanley B. Lippman. I read that when variables are initialized using curly braces and if the initialization results in loss of data then an error occurs.
double a=5.545;
int b{a};
std::cout<<b;
But when I run the above code I am not getting any error and getting the output as 5.
PS: I am using CLion IDE and MingW C++ compiler.