[libcxx-commits] [PATCH] D102121: [libcxx][ranges] adds _`non-propagating-cache`_
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 21 08:57:04 PDT 2021
ldionne marked 15 inline comments as done.
ldionne 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 {
----------------
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.
================
Comment at: libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp:50
+ {
+ Cache a; a.__set(T{3});
+ Cache b;
----------------
Mordante wrote:
> This tests an implementation detail. Shouldn't this be guarded for usage with the libc++ library?
> Other tests also use implementation details, please grep for `__`.
This test lives in `libcxx/test/libcxx`, which is for implementation details only.
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