Community
Participate
Working Groups
Consider the code: struct S { int x; } s { .x = 4 }; vs: struct S { int x; } s { 4 }; The first produces a red line under 's', the second works fine. Both are valid.
Interestingly, this works: struct S { int x; } = { .x = 4 }; (ie, assign instead of universal init)
Thanks @NightStrike for the bug report. Is this a C++20 extension? That is what it looks like on[1]: T object { .des1 = arg1 , .des2 { arg2 } ... }; (4) (since C++20) If so, I have added it to the backlog of C++20 stuff that is missing. At the moment there is no one actively looking at C++ language support in CDT. If you are interested in working on this and providing a patch please let me know. [1] https://en.cppreference.com/w/cpp/language/aggregate_initialization
Correct. While it was an extension supported by the major compilers for a long time, it only recently made it into the language proper. I'm sorry to hear about the developer need. I would think that c++ language support is a critical component of a c++ IDE. Sadly, I don't have the technical ability to provide a patch for this. I used to engage with Nathan Ridge on parser issues. Maybe he's available?
(In reply to NightStrike from comment #3) > I used to engage with Nathan > Ridge on parser issues. Maybe he's available? I moved on to clangd (https://clangd.llvm.org/) a few years ago. (I use it with the VSCode client but there are various other editor integrations for it.) Keeping a separate C++ parser implementation maintained in Eclipse CDT with new C++ language features just wasn't scalable. clangd is built on clang's parser, and gets access to new C++ features as soon as they're implemented in clang. I've also recently become aware of the CDT.cloud project (https://cdt-cloud.io/), which aims to develop an IDE similar to Eclipse CDT (e.g. suited for toolchain vendors to customize into their own toolchain-specific products) using clangd to provide language support.