[libcxx-commits] [PATCH] D117371: [libcxx][test] {move, reverse}_iterator cannot be instantiated for a type with no `operator*` in C++20
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 24 07:57:46 PST 2022
Quuxplusone added a comment.
> 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).
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