when learning about static_cast and dynamic_cast i saw an advice about additional checking on overflow and underflow when casting double type into int one. how can i do that here?
double value1{ 4.8967 };
int value2 = static_cast<int>(value1);
std::cout << value2 << std::endl;
i tried searching here and there only to found an arithmetic over-/underflow which seems not quite the case here. i'd appresiate a couple of links where i can read about it more specifically