Announcement

Collapse
No announcement yet.

GCC Developers Discuss Possible -std=c++current & -std=c++future Options

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by marios View Post
    it will be fun when people start using it at makefiles...
    makefiles will get IFDEF'd to death?

    Comment


    • #12
      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.

      Comment


      • #13
        Originally posted by Ironmask View Post
        Wow, 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.
        Modules should fix the issue to a great degree. Sadly not much effort on the modules front yet except by Microsoft.

        Comment


        • #14
          This 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...

          Comment


          • #15
            Originally posted by skeevy420 View Post
            I'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).
            And don't forget pre-previous and pre-pre-previous.

            Comment


            • #16
              Originally posted by tachi View Post
              This 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...
              For people to lazy to look up what the latest version is called? I don't think that justifies that option.

              Comment


              • #17
                I logged in to say how silly this idea is but everyone beat me to it.

                Comment

                Working...
                X