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

LGTM after addressing inline comments.



================
Comment at: test/std/strings/basic.string/string.cons/T_size_size.pass.cpp:39
         assert(pos <= sv.size());
-        unsigned rlen = std::min<unsigned>(sv.size() - pos, n);
+        unsigned rlen = std::min(static_cast<unsigned>(sv.size()) - pos, n);
         assert(s2.size() == rlen);
----------------
The cast should happen after the subtraction, not before.


================
Comment at: test/std/strings/basic.string/string.cons/T_size_size.pass.cpp:71
         assert(pos <= sv.size());
-        unsigned rlen = std::min<unsigned>(sv.size() - pos, n);
+        unsigned rlen = std::min(static_cast<unsigned>(sv.size()) - pos, n);
         assert(s2.size() == rlen);
----------------
The cast should happen after the subtraction, not before.


https://reviews.llvm.org/D32574



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to