[libcxx-commits] [PATCH] D131854: [libc++][test] fix C4267 warning in bitset.members\to_ulong.pass.cpp

Igor Zhukov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 14 07:45:56 PDT 2022


fsb4000 updated this revision to Diff 452522.
fsb4000 added a comment.

Thanks. Yes, you are right. It fixes the warning too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131854

Files:
  libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp


Index: libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
===================================================================
--- libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
+++ libcxx/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
@@ -33,8 +33,8 @@
         std::min(max, max-1),
         max
     };
-    for (unsigned long j : tests) {
-         std::bitset<N> v(j);
+    for (std::size_t j : tests) {
+        std::bitset<N> v(j);
         assert(j == v.to_ulong());
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131854.452522.patch
Type: text/x-patch
Size: 556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220814/e1c362d1/attachment.bin>


More information about the libcxx-commits mailing list