[libcxx-commits] [PATCH] D142302: [libc++][format] Fixes usage of contiguous ranges.

Jakub Mazurkiewicz via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jan 22 06:03:55 PST 2023


JMazurkiewicz added inline comments.


================
Comment at: libcxx/include/__format/range_formatter.h:175
+              ranges::data(__range),
+              ranges::size(__range),
+          },
----------------
How about using `ranges::distance` (http://eel.is/c++draft/range.iter.op.distance#4) here instead of `ranges::size`? We could get rid of `ranges::sized_range<_Rp>` constraint.

Also, I think we need extra includes: `<__ranges/data.h>` and `<__ranges/size.h>` (or `<__iterator/distance.h>`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142302



More information about the libcxx-commits mailing list