[PATCH] D48152: [CUDA] Add tests that, in C++14 mode, min/max are constexpr.

Justin Lebar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 29 17:37:44 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336030: [CUDA] Add tests that, in C++14 mode, min/max are constexpr. (authored by jlebar, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D48152

Files:
  test-suite/trunk/External/CUDA/algorithm.cu


Index: test-suite/trunk/External/CUDA/algorithm.cu
===================================================================
--- test-suite/trunk/External/CUDA/algorithm.cu
+++ test-suite/trunk/External/CUDA/algorithm.cu
@@ -42,6 +42,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 
@@ -56,6 +58,8 @@
   assert(std::minmax(1, 0).second == 1);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).first == -10);
   assert(std::minmax({0, 10, -10, 100}, std::less<int>()).second == 100);
+  constexpr auto min = std::min(1, 2);
+  constexpr auto max = std::max(1, 2);
 #endif
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48152.153603.patch
Type: text/x-patch
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180630/4e8481e2/attachment.bin>


More information about the cfe-commits mailing list