Can we be sure that valarray
is a specialized class template ? and that's why it doesn't let implicite conversion happen ?
std::valarray<int> values={1.0,2.0};
for(int it: values ){
std::cout<<it<<std::endl;
}
error: narrowing conversion of '1.1000000000000001e+0' from 'double' to 'int' [-Wnarrowing]