This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nurbs cannot be compiled with gcc 3.4


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::Point_nD<T, D> >
> PLib::NurbsCurve<T, N>::tesselate(T, BasicList<T>*) 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<PLib::Point_nD<float, 3>
>>>> BasicList(BasicList<PLib::Point_nD<float, 3> >)'
> ../matrix/list.h:128: note: candidates are:
> BasicList<T>::BasicList(BasicList<T>&) [with T =
> PLib::Point_nD<float, 3>] nurbs.cpp: In member function
> `BasicList<PLib::Point_nD<T, D> > PLib::NurbsCurve<T,
> N>::tesselate(T, BasicList<T>*) 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<T>'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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]