Skip to content

not_null cannot (and should not) be used with span #399

Open
@hpesoj

Description

@hpesoj

F.18 suggests that not_null can be used with span and string_span, but my tests would suggest otherwise. This behaviour seems correct, as arrays and strings cannot be null (null std::array or std::string anyone?) Indeed, span's operator bool() tests for "empty" status, and trying to compare a span with nullptr results in a compiler error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions