|
Ublas : |
Subject: Re: [ublas] Compilation error: error: expected nested-name-specifier before âVEC_Tâ
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-12-11 10:44:23
Parker Jones wrote:
>
> Hello all,
>
> I am compiling someone else's C++ application that uses UBLAS and am
> getting a compilation error:
>
> $ g++ distance.h
> distance.h:16: error: expected nested-name-specifier before âVEC_Tâ
> distance.h:16: error: expected â;â before âvector_typeâ
> distance.h:33: error: expected nested-name-specifier before âVEC_Tâ
> distance.h:33: error: expected â;â before âvector_typeâ
>
> Platform: Ubuntu 9.10, g++4.4, Boost 1.38.
> I haven't touched C++ in over 10 years, so apologies if this is a trivial
> question.
>
> Many thanks for any suggestions,
> Parker
>
The compiler is complaining that a "typename" keyword is used, whereas there
is no nested type defined. For example,
template< typename Vector >
struct something {
typedef Vector vector_type;
typedef typename vector::value_type value_type;
};
I.e., try removing the typename keyword from lines 16 and 33.
Cheers,
Rutger