[libcxx-commits] [PATCH] D121604: [libc++][NFC] Remove several redundant #if _LIBCPP_STD_VER > 17 in <span>

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 14 10:50:52 PDT 2022


ldionne marked 3 inline comments as done.
ldionne added inline comments.


================
Comment at: libcxx/include/span:255
     }
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif
 
----------------
jloser wrote:
> philnik wrote:
> > ldionne wrote:
> > > philnik wrote:
> > > > Why have you removed the comment completely? (Also in line 437)
> > > When blocks are really small, the readability improvement of commenting the `#endif` is questionable.
> > > 
> > > Do you agree @jloser @philnik ? If not, I don't mind adding them back.
> > 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.
> I'm fine omitting them for small blocks. For larger blocks, I like having them. 
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121604/new/

https://reviews.llvm.org/D121604



More information about the libcxx-commits mailing list