This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++0x Constructor Delegation take 2
- From: "Doug Gregor" <doug dot gregor at gmail dot com>
- To: "Pedro Lamarão" <pedro dot lamarao at mndfck dot org>, "Nathan Sidwell" <nathan at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Apr 2007 11:17:46 -0400
- Subject: Re: C++0x Constructor Delegation take 2
- References: <461DBB2D.4010309@mndfck.org>
Hi Pedro,
I have a few small comments to make about this version of the patch.
Otherwise, it looks good to me. However, I don't have the ability to
approve it. Nathan, could you take a look?
Index: gcc/testsuite/g++.dg/cpp0x/dc_02.C
===================================================================
--- gcc/testsuite/g++.dg/cpp0x/dc_02.C (revisão 0)
+++ gcc/testsuite/g++.dg/cpp0x/dc_02.C (revisão 0)
@@ -0,0 +1,35 @@
+// { dg-do compile }
+// { dg-options --std=gnu++0x }
I suggest using "-std=c++0x", since delegating constructors are in the
C++0x Working Paper (we're not relying on extensions at all).
+/* Initialize current class with INIT, a TREE_LIST of
+ arguments for a target constructor. If TREE_LIST is void_type_node,
+ an empty initializer list was given. */
+
+static void
+perform_target_ctor (tree init)
I suggest adding a comment stating that this routine implements the
delegating constructors feature of C++0x.
- Doug