User forums > Help
CodeBlocks Method Code completion
oBFusCATed:
What compiler version are you using?
I guess is newer than 5.x and so you're probably using the new c++abi, which uses c++11 features which our parser doesn't support.
I can reproduce the problem when I switch my compiler to GCC 6.3.0.
@ollydbg: Can you try to reproduce this problem?
ollydbg:
OK, I see the code suggestion of "str." under GCC 6.3 does not work, because the "basic_string" is now under a namespace inside namespace std.
Question: Where dose the actual "std::string" type actually defined? It should to connected to "std::__cxx11::basic_string<char>" or similar things.
See the image shot below:
ollydbg:
Some related report on other IDEs:
[QTCREATORBUG-16086] Refactoring fails for std::string on GCC 5 with C++11 ABI - Qt Bug Tracker
[QTCREATORBUG-15461] wrong autocompletion for std::string argument of a function with gcc5 - Qt Bug Tracker
It looks like QTcreator are moving to libclang, so they won't solve this issue in their current build-in parsers.
And some article about this "inline namespace", in-fact, I don't know what does the "inline namespace" means, does it means
std::string == std::__cxx11::string?
See this document: GCC compatibility: inline namespaces and ABI tags - Christian Aichinger's thoughts
EDIT: c++ - What are inline namespaces for? - Stack Overflow, it looks like my guess is right?
oBFusCATed:
Yes, they use it to provide new mangled names for the changed types and they still provide the old mangled names for old code.
gtg:
Sorry for the late comment. Wow thanks for help and the attention. How must i proceed change (I'm newbie into the c++/oop programing) the gnu gcc compiler version / c++ version , or there I must do some other changes. Thanks again.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version