summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_range_for.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-03 17:40:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-08 09:05:55 (GMT)
commit735adf2c94c1ee0cca710c6eb0bade2b84c461de (patch)
treec56784c49d8d8535f057157dc7b66b360d47d367 /Tests/CompileFeatures/cxx_range_for.cpp
parent0fa9bbf1fa5278d965cbbb7de82f56ef42789fe8 (diff)
downloadCMake-735adf2c94c1ee0cca710c6eb0bade2b84c461de.zip
CMake-735adf2c94c1ee0cca710c6eb0bade2b84c461de.tar.gz
CMake-735adf2c94c1ee0cca710c6eb0bade2b84c461de.tar.bz2
Features: Add cxx_range_for.
Diffstat (limited to 'Tests/CompileFeatures/cxx_range_for.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_range_for.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_range_for.cpp b/Tests/CompileFeatures/cxx_range_for.cpp
new file mode 100644
index 0000000..892109e
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_range_for.cpp
@@ -0,0 +1,10 @@
+
+void someFunc()
+{
+ int accumulated = 0;
+ int numbers[] = { 1, 2, 5 };
+ for (int i : numbers)
+ {
+ accumulated += i;
+ }
+}