[libcxx-commits] [PATCH] D98870: [DO NOT LAND] [libc++] [P2248] "Enabling list-initialization for algorithms"

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 18 16:37:27 PDT 2021


curdeius added inline comments.


================
Comment at: libcxx/include/algorithm:2053
+#if _LIBCPP_STD_VER > 20
+    = __iter_value_type<_OutputIterator>  // [ajo] P2248R1 says OutputIterator, but should be InputIterator
+#endif
----------------
Out of curiosity, what's your reasoning on this? Why input output should be preferred?
Do you mean some fancy output iterators that accept any type but e.g. do some counting and, hence, have a different value_type?


================
Comment at: libcxx/include/algorithm:4435
 
-template <class _ForwardIterator, class _Tp, class _Compare>
+template <class _ForwardIterator, class _Compare, class _Tp
+#if _LIBCPP_STD_VER > 20
----------------
Is switching the order necessary? It's not in the paper.
And it's a function template so there is no restriction on parameters following the defaulted one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98870



More information about the libcxx-commits mailing list