[libcxx-commits] [PATCH] D141456: [libc++][ranges] Fix incorrect integer type in `view_interface` tests.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jan 11 14:35:06 PST 2023


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Thanks!



================
Comment at: libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp:236
 
-  using SignedSize = std::common_type_t<std::ptrdiff_t, std::make_signed_t<std::size_t>>;
+  static_assert(std::same_as<decltype(std::declval<ForwardIter>() - std::declval<ForwardIter>()), std::ptrdiff_t>);
+  using UnsignedSize = std::make_unsigned_t<std::ptrdiff_t>;
----------------
var-const wrote:
> Please let me know if you think this line is overkill.
I would add a comment that says something like `// test the test`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141456



More information about the libcxx-commits mailing list