[libcxx-commits] [PATCH] D117918: [libc++][test] Add const and reference tests for enable_view. NFC.

Joe Loser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 21 12:48:40 PST 2022


jloser marked 4 inline comments as done.
jloser added inline comments.


================
Comment at: libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp:46
+static_assert(!std::ranges::enable_view<EnableViewFalse&&>);
+static_assert(std::ranges::enable_view<const EnableViewFalse>);
+static_assert(!std::ranges::enable_view<const EnableViewFalse&>);
----------------
Quuxplusone wrote:
> philnik wrote:
> > This seems weird. It looks to me like the standard requires it that way, but I don't know why.
> Yikes. Good catch. This reminds me of D116388, but unlike `bind`, this stuff is so new that I think this deserves an LWG issue. I'll request one.
Exactly my thoughts as well. It's clear from a technical perspective, but surely this isn't what the user intended. They likely intended to disable cv-qual of their type as well and expected us to do it for them basically by opting in for their type only (and not a**also**
for cv-qual of their type).

Generally speaking, this is likely to come up with //other customization points// in the standard library, but I'd have to search for other "broken" ones.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117918



More information about the libcxx-commits mailing list