ldionne added a comment.

If you use some of my suggestions, please make sure it compiles in C++03 mode. 
I might be using some C++11 features (not sure whether default argument for 
template parameters is C++03).



================
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);
----------------
vsapsai wrote:
> 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.
Ok.


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