summaryrefslogtreecommitdiff
path: root/Tests/Cuda/MixedStandardLevels5/lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Cuda/MixedStandardLevels5/lib.cpp')
-rw-r--r--Tests/Cuda/MixedStandardLevels5/lib.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/Cuda/MixedStandardLevels5/lib.cpp b/Tests/Cuda/MixedStandardLevels5/lib.cpp
new file mode 100644
index 0000000000..dd7b31bb55
--- /dev/null
+++ b/Tests/Cuda/MixedStandardLevels5/lib.cpp
@@ -0,0 +1,13 @@
+
+#if __cplusplus >= 201103L
+# error "invalid standard value"
+#endif
+int func(int A, int B)
+{
+ // Verify that we have at least c++14
+ if (A < B) {
+ return A + B;
+ } else {
+ return B * A;
+ }
+}