I believe the std:: int the actualtype cause it.
Guys, I found the reason for that and it's not easily solvable.
std:: completion worked fine (and still works fine) with GCC
3. It is broken with GCC
4 and the reason is simple:
Take for example the file vector.tcc (which is the implementation of std::vector in your GCC folder).
In version 3 it was:
#ifndef _VECTOR_TCC
#define _VECTOR_TCC 1
namespace _GLIBCXX_STD
{
// ...
} // namespace std
#endif /* _VECTOR_TCC */
As we replace "
_GLIBCXX_STD" within the parser with "
std", std::(vector) was easily resolvable. Now things have changed for GCC4, now the wrapper is as follows:
#ifndef _VECTOR_TCC
#define _VECTOR_TCC 1
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
// ...
_GLIBCXX_END_NESTED_NAMESPACE
#endif /* _VECTOR_TCC */
As you see: This is done using a macro. As we don't have macro expansion it won't work with out implementation of CC anymore. So - this is
not a bug in CC, "just" a missing feature and it happens
now as we all just jumped to GCC
4.
Hence I tried replacing:
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)with
using namespace std;and:
_GLIBCXX_END_NESTED_NAMESPACEwith "
}", but this of course works not, too as the
tokenizer has already tokenized the first statement. So the replacement cannot be done anymore. ;-) In addition the macros is not always like that and sometimes appears multiple times / is nested. So replacements have to be done carefully.