[libcxx-commits] [PATCH] D102121: [libcxx][ranges] adds _`non-propagating-cache`_
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 21 08:59:33 PDT 2021
Quuxplusone added inline comments.
================
Comment at: libcxx/include/__ranges/non_propagating_cache.h:42
+ // may refer to internal details of the source view.
+ template<class _Tp>
+ class __non_propagating_cache {
----------------
ldionne wrote:
> Mordante wrote:
> > Quuxplusone wrote:
> > > Mordante wrote:
> > > > http://eel.is/c++draft/range.nonprop.cache#1.1 `non-propagating-cache<T> constrains its type parameter T with is_object_v<T>.`
> > > This is undetectable, and therefore it's cheaper (in terms of compile time and source code simplicity) not to bother with it.
> > Ok. (It just makes me wonder why it's specified in the Standard.)
> I added it. It is detectable with SFINAE.
@ldionne: can you clarify what you mean? I believe it's undetectable in the sense that libc++'s users are not even allowed to //name// `__non_propagating_cache`, and libc++'s own code never attempts to SFINAE on it; therefore the SFINAE doesn't matter. Do you know any place where libc++ is trying to make a decision based on the well-formedness of `__non_propagating_cache<T>`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102121/new/
https://reviews.llvm.org/D102121
More information about the libcxx-commits
mailing list