summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-29 13:58:37 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-05-29 13:58:37 (GMT)
commit1468e986e1874f7c011e74885e4df2fbab65b396 (patch)
tree333b77c1a92d5d86e803f03019ecd582362eb003 /Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
parent9e11fcdc761f441de638b321874aea4d97a72676 (diff)
parentdd043c3f21fbfab17d7f400bd2bc9f927215b18e (diff)
downloadCMake-1468e986e1874f7c011e74885e4df2fbab65b396.zip
CMake-1468e986e1874f7c011e74885e4df2fbab65b396.tar.gz
CMake-1468e986e1874f7c011e74885e4df2fbab65b396.tar.bz2
Merge topic 'cxx14-features'
dd043c3f Features: Add support for C++14 features.
Diffstat (limited to 'Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp b/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
new file mode 100644
index 0000000..63a3713
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp
@@ -0,0 +1,9 @@
+
+struct X { int i, j, k = 42; };
+
+int someFunc()
+{
+ X a[] = { 1, 2, 3, 4, 5, 6 };
+ X b[2] = { { 1, 2, 3 }, { 4, 5, 6 } };
+ return a[0].k == b[0].k && a[1].k == b[1].k ? 0 : 1;
+}