[libcxx-commits] [PATCH] D102020: [libcxx][ranges] Add class ref_view.

Tim Song via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 3 17:28:59 PDT 2021


tcanens added inline comments.


================
Comment at: libcxx/include/__ranges/ref_view.h:40-41
+
+    static void __test(_Range&);
+    static void __test(_Range&&) = delete;
+
----------------
ldionne wrote:
> Those can be made private, and I would perhaps rename it to something like `__binds_to_lvalue_ref` or something like that.
> 
> Do you have a better understanding of what this function is used for than I do? IIUC, it's only used to check that `__tp` in the constructor below would bind to a lvalue, but not to a rvalue. I'm kind of wondering why the Standard is using this obtuse wording -- there must be a good reason?
This is the [LWG2993](https://cplusplus.github.io/LWG/issue2993) dance to avoid having an ICS from rvalues.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102020



More information about the libcxx-commits mailing list