[libcxx-commits] [PATCH] D116569: [libc++] [ranges] Add namespace __cpo to ranges::{advance, next, prev}.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 4 14:00:23 PST 2022
ldionne added inline comments.
================
Comment at: libcxx/include/__iterator/advance.h:74
+namespace __advance {
+ struct __fn final : private __function_like {
+ private:
----------------
var-const wrote:
> Quuxplusone wrote:
> > var-const wrote:
> > > Formatting nit: I think namespaces [aren't supposed to](https://llvm.org/docs/CodingStandards.html#namespace-indentation) introduce a new level of indentation.
> > In general yeah, but this is consistent with most other niebloids/CPOs in libc++ today.
> > `git grep -h struct.__fn libcxx/include/`
> I don't see a reason for niebloids to diverge from the style guide, and I don't think we should try to be consistent with things that are incorrectly (IMO) formatted. That would largely defeat the purpose of having a style guide if, once an inconsistent piece of code gets into the code base, it effectively takes precedence over the style guide.
I had missed it, but it does seem more consistent *not* to indent the content of long namespaces since that's what we tend to do elsewhere. Also. it means touching fewer lines, which I guess is good.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116569/new/
https://reviews.llvm.org/D116569
More information about the libcxx-commits
mailing list