[libcxx] r272621 - Prevent truncation warning. Patch from STL at microsoft.com

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 19:54:15 PDT 2016


Author: ericwf
Date: Mon Jun 13 21:54:15 2016
New Revision: 272621

URL: http://llvm.org/viewvc/llvm-project?rev=272621&view=rev
Log:
Prevent truncation warning. Patch from STL at microsoft.com

Modified:
    libcxx/trunk/test/std/utilities/function.objects/unord.hash/floating.pass.cpp

Modified: libcxx/trunk/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/unord.hash/floating.pass.cpp?rev=272621&r1=272620&r2=272621&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/unord.hash/floating.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/unord.hash/floating.pass.cpp Mon Jun 13 21:54:15 2016
@@ -35,7 +35,7 @@ test()
 
     std::size_t t0 = h(0.);
     std::size_t tn0 = h(-0.);
-    std::size_t tp1 = h(0.1);
+    std::size_t tp1 = h(static_cast<T>(0.1));
     std::size_t t1 = h(1);
     std::size_t tn1 = h(-1);
     std::size_t pinf = h(INFINITY);




More information about the cfe-commits mailing list