Limit item count in ItemBuilder to basically uint16_t
- Limit item count in ItemBuilder to basically uint16_t
An item count < 0 makes no sense, and creating more than 65535 items probably also signals that we have some issue, as it's a lot more items than reasonable.
This also prevents a crash where std::vector::reserve(-1) throws a
length_error.