[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Using newer C++ standards with CDT
|
Dear Jonah
Your reply in the stackoverflow thread is awesome. While I don't know for sure this is the problem the OP encountered, it is a reoccurring problem our students had since we started with C++11/14.
We had a simple workaround first for non-Windows platforms: Create a script wrapping the g++ command and adding the -std=c++11/14 flag. This virtually adds the flag to all compile commands and the discovery command in CDT. While that worked for educational purposes, that might not be a feasible solution for all systems.
For the current semester we have another solution. Marco Syfrig and Jonas Biedermann implemented a plug-in for Cevelop that adds an additional page to the new project wizard that allows configuration of the newly created project for a specific version. Elevenator, as it is called, can set the compiler options, the discovery options and CodAn checkers depending on the selected C++ version.
Unfortunately, the configuration of the "Dialect" option is lost upon changing the toolchain. Which is the point where the power of the plug-in ends, as it can just perform the initial configuration. But that solved 95% of the version-related problems for us. And for me too it is a blessing when creating new projects often.
Eventually, I think we will need better integration of the selected C++ standard version in CDT than we have now. I'm pretty sure this will be required for the parser sooner or later too. Currently, our internal C++ parser can cope with all versions of the standard. Due to backwards-compatibility of the C++ standard that works so far. But I would not take it for granted that this will be the case in the future.
Best Regards
Thomas
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Nathan Ridge
Sent: Mittwoch, 4. November 2015 05:38
To: CDT Mailing List <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Using newer C++ standards with CDT
> As I said on one of the recent CDT Debug calls I have been trying to
> ensure there are better quality answers to some Eclipse and CDT
> questions on stack overflow.
Thanks for doing this!
> I would really appreciate someone in the know reviewing this question
> and my answer. I want to ensure I have not missed something along the
> way (and as a result overcomplicated my and the OP's life).
I don't think we can be sure until we hear back from the OP, but it's quite plausible that the problem is what you described.
> If I haven't missed something, then I see this as a top place where we
> can do better by default.
I agree. There are several usability issues around getting CDT to parse standard library headers in C++11 mode. I have a bug on file for one of them [1], which affects makefile projects.
The problem you describe sounds like it affects managed build projects.
I agree that we should make this experience better. I'm not familiar with the relevant part of CDT's codebase and architecture, and so I don't know how easy or difficult it would be to fix this, but filing a bug is probably a good start.
Regards,
Nate
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=449542
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/cdt-dev