[libcxx-commits] [PATCH] D141699: [libc++][ranges] Implement P2474R2(`views::repeat`).
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 17 15:19:00 PDT 2023
philnik added inline comments.
================
Comment at: libcxx/include/__fwd/repeat_view.h:45
+namespace __repeat {
+struct __fn {
+ template <class _Tp>
----------------
var-const wrote:
> yronglin wrote:
> > var-const wrote:
> > > Does `__fn` have to be here and not in the main `repeat_view.h` file? It's not a forward declaration, it's a definition.
> > Yeah, because in `drop_view.h` and `take_view.h` called `views::repeat(...)`, should we merge this file and the main `repeat_view.h` ?
> Honestly, I don't have a strong preference here. @philnik What do you think? I don't think we had a precedent for defining the function objects in a `fwd` file (and IMO it makes it not really a forward file), so it feels perhaps a little "inelegant" (to me). Do you think this results in a meaningful reduction of compilation times?
I don't think it worth it. We might consider this a problem once we remove transitive includes, but until then any avoided includes should be kept to the big gains IMO. I really hope we will do a big cleanup soon. Looking at the amount of includes removed from old standards in this and the last release makes it look like it's just a matter of time before we have to anyways.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141699/new/
https://reviews.llvm.org/D141699
More information about the libcxx-commits
mailing list