Message: previous - next
Month: July 2012

Re: [trinity-devel] kima - ftbfs - error: 'list' in namespace 'std' does not name a type

From: "David C. Rankin" <drankinatty@...>
Date: Thu, 19 Jul 2012 23:12:18 -0500
On 07/17/2012 01:25 PM, Nix wrote:
> On 17 Jul 2012, David C. Rankin outgrape:
>> --- kima/src/kima.h
>> +++ kima/src/kima.h     2012-07-17 00:44:44.835910307 -0500
>> @@ -35,6 +35,9 @@
>>  #include <tqptrlist.h>
>>  #include <tqlabel.h>
>> +// Namespace
>> +using namespace std;
>> +
> That's not going to help: the list below on line 177 is already
> namespace-qualified with std::.

What is wrong with private declaration:

  'void addSources(const std::list<Source*>& inList);'

(line 177 kima.h) see:

That is the line causing the error:

In file included from kima.moc.cpp:9:0:
./kima.h:179:24: error: 'list' in namespace 'std' does not name a type
./kima.h:179:29: warning: ISO C++ forbids declaration of 'parameter' with no
type [-fpermissive]
./kima.h:179:33: error: expected ',' or '...' before '<' token

  This has nothing to do with the information turned up from searching: "error:
'list' in namespace 'std' does not name a type" e.g.: or any of the others turned up.
It's like a round-peg error looking for a square-hole to fit in.

It seems like this is just generated out of thin air. The namespace is correct,
the declaration is std:: qualified, I can't find any standard it violates. It is
like this is some implicit declaration problem that just shouldn't exist, or
like gcc no longer knows what a STL list is.

c++ gurus -- what is your take -- it still won't build :(

David C. Rankin, J.D.,P.E.