there is an expression (as a part of median calculation):
auto iter1 = std::next(first, floor(size/2) - 1 );
double result = *iter1 + *(iter1 + 1)) / 2;
where the type of the value under iterators is int.
expected result e.g.:
1.5 = (1 + 2 ) / 2
however , in case of values 1 and 2 the result is 1, looks like implicit conversion to int
please explain, what the rule (or my misunderstanding?) is applied here