Author Topic: suggestion: to make codeblock c++11 friendly  (Read 3974 times)

anonymous user

  • Guest
suggestion: to make codeblock c++11 friendly
« on: June 20, 2016, 04:05:30 pm »
In code::blocks, it would be nice when using

   shared_ptr<type> aptr{new class1}

and

  unique_ptr<type> bptr{new class2}

If code::Blocks would run a regular expression on the code to convert these back to:
  class1* aptr

and

  class2* bptr

so that when you type aptr followed by "->" it will provide a list that corresponds to the methods that the class provides??


======
my other peeve, is that I think codeblock should treat STL containers special and the debugger should secretly poke into the STL containers and present the underlying data in the debug watch window as a string representation of the data in the object.... how hard could it be to find the place char* is stored in std:string and make it appear as the toplevel in the watch variable for std::string?

That's one of the things I always hate about using std::string verse char*.... the later (chaR*) is easier to debug because you can actually see the string without clicking around through hierarchy, whereas the former (std:string) you have to click and search around for the char* embedded in the string object string that corresponds to the object... can't you guys make an exception for STL std::string and poke directly into the object for people and bring it to the top so that when you watch std::string in the watch window it looks just like a char*??  and yet you still have the opinion to drill into the object and examine it in detail in the debugger watch window If you want....

======
Another think I really hate about STL and templates in general... I really wish codeblock would provide a filter checkbox for the compile output that you could click that would filter out all the "namespace::"  (blah blah) in the compiler output... that really gives me a headache sometimes looking at that crap....
Its just redundant info that the programmer already knows about and makes the warning and error lines too long to understand sometimes... all that is needed to fix this is to provide a sed like filter to remove the namespace information from the output so that people don't need to look at it all the time if they don't want to ,,,,
« Last Edit: June 20, 2016, 04:11:22 pm by anonymous user »

Offline yvesdm3000

  • Almost regular
  • **
  • Posts: 225
Re: suggestion: to make codeblock c++11 friendly
« Reply #1 on: June 20, 2016, 09:59:18 pm »
You can also try ClangCC for code completion. It knows about templates and will give you what you want with "." or "->" on a shared_ptr<> or unique_ptr<>.

http://forums.codeblocks.org/index.php/topic,20623.165.html

Yves
Clang based code completion for Code::Blocks:   http://github.com/yvesdm3000/ClangLib