vsapsai added a comment.

Thanks for the feedback. Answered one simple question, the rest needs more time.



================
Comment at: 
libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp:186
+  std::vector<float> v(array, array + 3);
+  assert(std::fabs(v[0] - 0.0f) < FLT_EPSILON);
+  assert(std::fabs(v[1] - 1.0f) < FLT_EPSILON);
----------------
ldionne wrote:
> I do not understand this test, can you please explain?
At some point I had implementation that was using memcpy for initialization in 
this case. But in memory `{0, 1, 2} != {0.0f, 1.0f, 2.0f}`. I think I'll change 
the test to initialize `vector<int>` with `float[]` and it will simplify 
asserts. Because currently those fabs and FLT_EPSILON are noisy and add 
unnecessary cognitive load.


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

https://reviews.llvm.org/D48342



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

Reply via email to