summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda/MixedStandardLevels4/lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Cuda/MixedStandardLevels4/lib.cpp')
-rw-r--r--Tests/Cuda/MixedStandardLevels4/lib.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Cuda/MixedStandardLevels4/lib.cpp b/Tests/Cuda/MixedStandardLevels4/lib.cpp
new file mode 100644
index 0000000..ef6fc20
--- /dev/null
+++ b/Tests/Cuda/MixedStandardLevels4/lib.cpp
@@ -0,0 +1,16 @@
+
+
+constexpr int func(int A, int B)
+{
+#if defined(_MSC_VER) && _MSC_VER < 1913
+ // no suppport for extended constexpr
+ return B * A;
+#else
+ // Verify that we have at least c++14
+ if (A < B) {
+ return A + B;
+ } else {
+ return B * A;
+ }
+#endif
+}