`assert(read_head_->write_pos > read_head_->read_pos)`? They're both unsigned so if a bug sneaks in where read_pos > write_pos, read_pos - write_pos wraps around.