[all-commits] [llvm/llvm-project] c965d5: [libc++] [ranges] Implement std::ranges::distance

Quuxplusone via All-commits all-commits at lists.llvm.org
Mon Jan 31 09:23:35 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c965d5448ecdf9a5513983862a78a2ba8f7fbab8
      https://github.com/llvm/llvm-project/commit/c965d5448ecdf9a5513983862a78a2ba8f7fbab8
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M libcxx/docs/Status/Cxx2bIssues.csv
    M libcxx/docs/Status/RangesPaper.csv
    M libcxx/include/__iterator/distance.h
    A libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
    A libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
    A libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
    M libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp

  Log Message:
  -----------
  [libc++] [ranges] Implement std::ranges::distance

This includes an experimental workaround for
LWG3664 "LWG3392 broke std::ranges::distance(a, a+3)",
but the workaround may be incomplete, I'm not sure.
This should be re-audited when LWG3664 is actually adopted,
to see if we need to change anything about our implementation.

See also https://github.com/microsoft/STL/pull/2500

Differential Revision: https://reviews.llvm.org/D117940




More information about the All-commits mailing list