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

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 10 20:38:04 PST 2023


var-const added inline comments.


================
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>;
----------------
Please let me know if you think this line is overkill.


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