diff options
author | Hannes Vogt | 2019-09-13 21:44:17 +0000 |
---|---|---|
committer | Nathan Ridge | 2019-09-26 04:12:11 +0000 |
commit | 944ec0e06edcf5869b5af2322da7dd863f3b2dc9 (patch) | |
tree | a9e6d9577006fbd96afb5fb80028f2f4f0ccb8a8 /core/org.eclipse.cdt.core.tests | |
parent | aee38fb062025cf9d0d74c0d4f69bd05f064805c (diff) | |
download | org.eclipse.cdt-944ec0e06edcf5869b5af2322da7dd863f3b2dc9.tar.gz org.eclipse.cdt-944ec0e06edcf5869b5af2322da7dd863f3b2dc9.tar.xz org.eclipse.cdt-944ec0e06edcf5869b5af2322da7dd863f3b2dc9.zip |
Bug 549367 - [C++17] Aggregate init of base
Implements http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0017r1.html:
Types with non-private, non-protected, non-virtual base classes can be
aggregate initialized.
Change-Id: Idad341d45d6aaf1d8c36691cf8d7bc7cd049e28b
Signed-off-by: Hannes Vogt <hannes@havogt.de>
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r-- | core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/cxx17/CXX17ExtensionsTests.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/cxx17/CXX17ExtensionsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/cxx17/CXX17ExtensionsTests.java new file mode 100644 index 00000000000..b91cb51f6bd --- /dev/null +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/cxx17/CXX17ExtensionsTests.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.cdt.core.parser.tests.ast2.cxx17; + +import org.eclipse.cdt.core.parser.tests.ast2.AST2CPPTestBase; + +import junit.framework.TestSuite; + +public class CXX17ExtensionsTests extends AST2CPPTestBase { + + public static TestSuite suite() { + return suite(CXX17ExtensionsTests.class); + } + + // struct Base { + // int foo; + // }; + // struct MyStruct : public Base { + // int a; + // }; + // + // int main() { + // MyStruct test = { {0}, 9 }; + // } + public void testAggregateInitializationOfBaseClass_549367() throws Exception { + parseAndCheckImplicitNameBindings(); + } +} |