Code: Select all
class Example {
vector<int> works;
vector<int> doesntwork { 0 };
}
I can't find the member "doesntwork" in the auto-completion list. If I remove the curly brace initialization ({0}), then it shows up.
Code: Select all
class Example {
vector<int> works;
vector<int> doesntwork { 0 };
}
Code: Select all
vector<int> doesntwork { 0 };
It is in C++11, which is the current standard (approved, not experimental anymore).Jarod42 wrote:is not a valid declaration.Code: Select all
vector<int> doesntwork { 0 };
Well obviously you'd have to #include <vector> and "using namespace std;". I left that out to make a shorter example.Jarod42 wrote:Not valid as you wrote in the class.
Compiling clang (and getting it to work) on Windows is quite hard. I've tried several times, and it never worked. Do you have a working MinGW+Clang distro?Jarod42 wrote:you can enable clang completion in menu:
Settings... -> Tags settings.. -> clang -> Enable clang completion
and then it works for me.
In general, bugs / features reported here (i.e. on the forum) tend to get lost..SuperV1234 wrote:Can this issue be looked into? Curly-initialization is good practice and modern code should use it as much as possible.
Thanks for posting this in SF.SuperV1234 wrote:I posted it here: https://sourceforge.net/p/codelite/bugs/846/
I messed up the formatting unfortunately. I posted it as a single bug report because I think the problems are really closely related, probably the code parser just being unable to parse the curly initialization correctly.