[libcxx-commits] [PATCH] D117371: [libcxx][test] {move, reverse}_iterator cannot be instantiated for a type with no `operator*` in C++20
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 24 09:26:46 PST 2022
ldionne added a comment.
In D117371#3266376 <https://reviews.llvm.org/D117371#3266376>, @Quuxplusone wrote:
>> Just curious, why does it not work with MSVC? The most naive implementation of `move_iterator` would allow instantiating it without an `operator*` as long as you don't try to instantiate `operator*`. Does MSVC do it differently?
>
> Casey explains this in the commit summary:
>
>> their nested reference types are defined in terms of `iter_reference_t<T>`, which examines `decltype(*declval<T>())`.
>
> This is new in C++20; we haven't done it yet (but I'm working on it).
Oh thanks for pointing this out and sorry for the noise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117371/new/
https://reviews.llvm.org/D117371
More information about the libcxx-commits
mailing list