[libcxx-commits] [PATCH] D99855: [libcxx] makes `iterator_traits` C++20-aware
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Apr 13 14:01:10 PDT 2021
zoecarver added inline comments.
================
Comment at: libcxx/include/iterator:735
+template<__specifies_members _Ip>
+struct __iterator_traits<_Ip> {
+ using iterator_category = typename _Ip::iterator_category;
----------------
zoecarver wrote:
> Can you define this //before// `iterator_traits`? I feel like there's needless complexity here.
This is a sort of general note for the whole patch. I think it's best to define things and then use them. I don't really see any benefit to declaring them, using them, then defining them. And it makes it harder to read/understand, increases code size, complexity, compile time, etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99855/new/
https://reviews.llvm.org/D99855
More information about the libcxx-commits
mailing list