You should use a `static_cast<size_t>(cs.cbInQue)` here.