Originally posted by marios
View Post
Announcement
Collapse
No announcement yet.
GCC Developers Discuss Possible -std=c++current & -std=c++future Options
Collapse
X
-
I use std=latest for unreleased/private projects. Never had issues. So this is a welcome change for gcc frontends.
something like std=stable would be nice for existing public projects.Last edited by cj.wijtmans; 01 September 2022, 04:35 PM.
- Likes 3
Comment
-
Originally posted by Ironmask View PostWow, this is the worst idea I've heard all day. Run your package manager's update script and break your source code! Share the same repo with your friends and get a different output!
I genuinely can't think of a single use for this, except maybe to make tutorials for newbies easier. But then they're not even going to be doing much that concerns specific compiler versions. It's not even a useless feature, it's an anti-feature, like C++ exceptions. Something people are going to have to work around and cleanup after and police the community so nobody abuses it.
F.Ultra has a good idea. That's how Rust dependencies work too, you can define a range of versions and the toolchain will just pick whichever one works. Although when it comes to languages, one downside to that idea is that you'd have to ensure your code doesn't subtly break over a range of compiler versions, instead of just the one you're targeting. Really the best option is to target a compiler and stick with it, code that compiles with other compiler/language versions should just be a happy coincidence. And when it's time to move, you can really take time to ensure your code is properly updated for the new tooling.
- Likes 1
Comment
-
Originally posted by skeevy420 View PostI'm surprised that "previous" wasn't also suggested for the day that "future" becomes "current" and shit hits the fan. That just seems like a common sense option. Perhaps even a "legacy" that allows using the oldest standard version the compiler officially supports (I'm assuming things like 98 and 03 become depreciated over time).
- Likes 1
Comment
-
Originally posted by tachi View PostThis is really useful to test that e.g. your code is working fine with the latest C++ draft supported by your compiler.
But you shouldn't use if for production, or course...
- Likes 2
Comment
Comment