It turns out that the whole header is only enabled in C++20 and above,
so these checks were redundant (and always true).
Details
- Reviewers
jloser Mordante - Group Reviewers
Restricted Project - Commits
- rG849e749d7f82: [libc++][NFC] Remove several redundant #if _LIBCPP_STD_VER > 17 in <span>
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/span | ||
---|---|---|
255 | Why have you removed the comment completely? (Also in line 437) |
LGTM - thanks for noticing this! I'd appreciate it if you fix @philnik nits on the macro #endif comments removed before landing this.
libcxx/include/span | ||
---|---|---|
255 | I think I'd like to keep them. In some situations it drastically increases readability and definitely doesn't hurt even with these small blocks. |
Nice catch LGTM! I've no strong preference regarding the removed comments. For these small blocks I tend to omit them.
libcxx/include/span | ||
---|---|---|
255 | I'm fine omitting them for small blocks. For larger blocks, I like having them. |
libcxx/include/span | ||
---|---|---|
255 | I'll re-add it for __span_compatible_range above (I was actually not convinced when I removed it), but the other ones are really small, so removing them is more consistent with the rest of the library. Hopefully that should strike the right balance and everybody should find it reasonable. |
Why have you removed the comment completely? (Also in line 437)