[libcxx-commits] [PATCH] D123600: [libc++][ranges] Implement `views::take`.

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 15 14:48:22 PDT 2022


huixie90 added inline comments.


================
Comment at: libcxx/include/__fwd/string_view.h:1
+// -*- C++ -*-
+//===---------------------------------------------------------------------===//
----------------
philnik wrote:
> huixie90 wrote:
> > ldionne wrote:
> > > philnik wrote:
> > > > `__string_view/fwd.h` would make more sense I think. Same for `span`.
> > > FWIW I don't really have a strong opinion. The only downside to this is that we might end up with a lot of one-header subdirectories if we start adding forward declarations to more classes, and putting everything under `__fwd/` would avoid that.
> > I am in favour of fwd folder. I don’t like to have too many files with the exact same name fwd.hpp 
> I don't like having a `__fwd` subdirectory because that would mean we have a single header spread across multiple subdirecories. That makes it a lot harder to see what is part of a header.
I think having a single fwd folder whose subdirectories hierarchies follow the non-fwd hierarchies is pretty neat. You can easily find the forward declarations by adding a fwd at the beginning. One example code base is Boost.Hana 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123600/new/

https://reviews.llvm.org/D123600



More information about the libcxx-commits mailing list