SERVER-137286In Code Review

Use span in BSONElement constructor

To perform bound checking, we need BSONElement to take a std::span in its constructor. The refactor is significant enough to mandate its own separate PR.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.