summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/msvc_permissive.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/msvc_permissive.cxx')
-rw-r--r--Tests/CompileFeatures/msvc_permissive.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/msvc_permissive.cxx b/Tests/CompileFeatures/msvc_permissive.cxx
new file mode 100644
index 0000000..a8f2ff3
--- /dev/null
+++ b/Tests/CompileFeatures/msvc_permissive.cxx
@@ -0,0 +1,9 @@
+#if !defined(_MSVC_LANG) || _MSVC_LANG < 202002L
+# error "This source must be compiled with MSVC as C++20 or later."
+#endif
+// Test a construct that is allowed by MSVC only with 'cl -permissive'.
+enum class X
+{
+ Y = 1
+};
+int array[X::Y];