From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24268 invoked by alias); 16 Oct 2004 15:26:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24252 invoked by uid 48); 16 Oct 2004 15:26:26 -0000 Date: Sat, 16 Oct 2004 15:26:00 -0000 Message-ID: <20041016152626.24251.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041015215108.18028.bill@graysoft.com> References: <20041015215108.18028.bill@graysoft.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/18028] nested calls to template constructors generate incorrect result X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg02244.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2004-10-16 15:26 ------- Yes, to be more specific: in this situation ------------- struct X { template X(T t); }; int main () { X x; X y(x); } ------------- the compiler has to generate a copy constructor itself, the template copy constructor is only used for arguments T which are not of type X. You will want to have an additional, non-template constructor. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18028