flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

[C++] make_span should have an overload for pointer to vector and return an empty span for nulllptr

Open stefan301 opened this issue 3 years ago • 2 comments

It would be handy if there was a make_span overload accepting a pointer to the Vector (like VectorLength). This overload should do the nullptr check and return an empty span in case of nullptr.

If this makes sense, I could make a PR.

stefan301 avatar Jul 03 '22 15:07 stefan301

@vglavnyy

CasperN avatar Jul 12 '22 14:07 CasperN

@stefan301 Feel free to make a PR.

dbaileychess avatar Jul 26 '22 22:07 dbaileychess