This is the mail archive of the gcc-help@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: Template linker errors with gcc 4.6.3


On 4 November 2013 15:34, David Aldrich wrote:
>
>> At a guess, maybe because the function is declared as something like
>> Matrix<T>::eye(unsigned, double = 0.0) i.e. just because you pass the function
>> an int doesn't mean that's what the function is declared to take.
>
> You are absolutely correct, of course, eye() is defined in Matrix.h as follows:
>
> template<class T> class Matrix : public MatrixBase
> {
> public:
>     <snip>
>     static Matrix<T> eye( unsigned a_size, T a_scalingFactor=1.0 ) DONT_INLINE;
>     <snip>
> }
>
> Does that point to the root cause of the problem?

No, it just means that the compiler is correct to require
Matrix<double>::eye(unsigned int, double) instead of
Matrix<double>::eye(int)


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