[libcxx-commits] [PATCH] D102006: [libcxx][ranges] Add range.subrange.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 1 16:27:15 PDT 2021


zoecarver added a comment.

Sorry for the slow reply. Thanks @Mordante.

@cjdb how's this look now?



================
Comment at: libcxx/include/__ranges/subrange.h:159
+
+    [[nodiscard]] constexpr bool empty() const { return __begin == __end; }
+
----------------
Mordante wrote:
> This one shouldn't be `[[nodiscard]]` according to the Standard.
I think we decided that members named "empty" are sufficiently vexing because users something think it will empty the container (or in this case sub range). 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102006



More information about the libcxx-commits mailing list