From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32181 invoked by alias); 24 Nov 2004 15:35:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 31634 invoked from network); 24 Nov 2004 15:35:20 -0000 Received: from unknown (HELO mail.fib.upc.es) (147.83.41.105) by sourceware.org with SMTP; 24 Nov 2004 15:35:20 -0000 Received: from correu.fib.upc.es (correu.fib.upc.es [147.83.41.107]) by mail.fib.upc.es (Postfix) with ESMTP id 20B18C9AD5; Wed, 24 Nov 2004 16:35:15 +0100 (CET) Received: by correu.fib.upc.es (Postfix, from userid 99) id A81507A5E; Wed, 24 Nov 2004 16:35:14 +0100 (CET) Received: from 149.red-62-57-1.user.auna.net (149.red-62-57-1.user.auna.net [62.57.1.149]) by webmail.fib.upc.es (IMP) with HTTP for ; Wed, 24 Nov 2004 16:35:14 +0100 Message-ID: <1101310514.41a4aa3296c36@webmail.fib.upc.es> Date: Wed, 24 Nov 2004 16:30:00 -0000 From: e7677215@est.fib.upc.edu To: Giovanni Bajo Cc: gcc@gcc.gnu.org Subject: Re: nurbs cannot be compiled with gcc 3.4 References: <1101288663.41a454d70a0dc@webmail.fib.upc.es> <25ad01c4d210$782e33a0$2fb82997@bagio> In-Reply-To: <25ad01c4d210$782e33a0$2fb82997@bagio> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.4 X-Originating-IP: 62.57.1.149 X-Scaned-FIB: AntiVirus/AntiSpam en fib.upc.es X-SW-Source: 2004-11/txt/msg00898.txt.bz2 > e7677215@est.fib.upc.edu wrote: > > > I need to install nurbs++-3.0.11 compiling it with gcc 3.4...., it > > can be compiled with gcc 3.3 but it cannot be compiled with gcc 3.4, > > it returns a lot of errors. I soved some problems of templates, but > > there's one I can't solve : > > > > nurbs.cpp: In member function `BasicList > > > PLib::NurbsCurve::tesselate(T, BasicList*) const [with T = > > float, int N = 3]': > > f_nurbs.cpp:56: instantiated from here > > nurbs.cpp:5252: error: no matching function for call to > > `BasicList > >>>> BasicList(BasicList >)' > > ../matrix/list.h:128: note: candidates are: > > BasicList::BasicList(BasicList&) [with T = > > PLib::Point_nD] nurbs.cpp: In member function > > `BasicList > PLib::NurbsCurve > N>::tesselate(T, BasicList*) const [with T = float, int N = 2]': > > > Looks like you are attemping to bind a temporary to a non-const reference. > This > is invalid. More to the point, a copy constructor should always be declared > as > A(A const &), not A(A&). BasicList's copy constructor seems to violate > this. > > BTW, when upgrading to 3.4, http://gcc.gnu.org/gcc-3.4/changes.html can be > very > helpful. > > Giovanni Bajo > > Well, I don't know what I'm doing wrong but I can't compile it. Here are the functions : from nurbs.cpp : template BasicList< Point_nD > NurbsCurve::tesselate(T tolerance,BasicList *uk) const{ BasicList< Point_nD > list, list2 ; NurbsCurveArray ca ; decompose(ca) ; if(ca.n()==1){ // get the number of steps T u = 0 ; Point_nD maxD(0) ; Point_nD prev ; Vector< Point_nD > ders(2) ; deriveAt(u,1,ders) ; prev = ders[1] ; int i ; for(i=1;i<11;++i){ u = T(i)/T(10) ; deriveAt(u,1,ders) ; Point_nD delta = ders[1]-prev ; delta.x() = absolute(delta.x()) ; delta.y() = absolute(delta.y()) ; delta.z() = absolute(delta.z()) ; maxD = maximumRef(maxD,delta) ; prev = ders[1] ; } const T sqr2 = T(1.414241527) ; int n = (int)rint(sqr2*norm(maxD)/tolerance) ; n+=2 ; if(n<3) n = 3 ; for(i=0;iadd(u) ; } return list ; } else{ for(int i=0;i >*)list.last()) ; list.addElements(list2) ; } } return list ; } from list.h : template BasicList::BasicList(BasicList const &a): BasicNode() { <---- line 128 first_ = last_ = 0 ; current = first_ ; *this = a ; nc = 0 ; n = 0 ; } What's wrong? Thanks.