Announcement

Collapse
No announcement yet.

GCC 11 Proposal Would Default To C++17 Level Features

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

  • GCC 11 Proposal Would Default To C++17 Level Features

    Phoronix: GCC 11 Proposal Would Default To C++17 Level Features

    Since last year's GCC 9 release the C++17 support has been considered stable and with the changeover to it as the default C++ dialect having not happened for the recent GCC 10 release, developers are now looking at increasing the default C++ version to 17 for next year's GCC 11 release...

    http://www.phoronix.com/scan.php?pag...ault-Dialect-P

  • #2
    C++17 as default would be a huge step as than modern C++ is obligatory.
    Unfortunately a lot of features of `Modern C++' as introduced in C++11 and C++14 (concerning both language basics and libstdc++) were not obligatory and thus with C++14 as default a lot of inconsistencies survived.
    As those changes were marked obligatory with C++17, these had finally to be addressed thus making it more consistent and appropriate to teach modern C++.

    Comment


    • #3
      As far as I know, the C++17 isn't really complete yet. We are still missing some standard library bits such as from_chars with floating points and hardware interference size.

      Comment


      • #4
        Originally posted by JMB9 View Post
        C++17 as default would be a huge step as than modern C++ is obligatory.
        Unfortunately a lot of features of `Modern C++' as introduced in C++11 and C++14 (concerning both language basics and libstdc++) were not obligatory and thus with C++14 as default a lot of inconsistencies survived.
        As those changes were marked obligatory with C++17, these had finally to be addressed thus making it more consistent and appropriate to teach modern C++.
        Yes, but for pedagogical purposes -std=c++17 has been essentially complete since GCC-7, used by Ubuntu 18.04. RHEL-8 / CentOS-8 use GCC 8, Fedora 32 GCC-10
        https://gcc.gnu.org/projects/cxx-status.html

        Comment


        • #5
          Originally posted by pipe13 View Post

          Yes, but for pedagogical purposes -std=c++17 has been essentially complete since GCC-7, used by Ubuntu 18.04. RHEL-8 / CentOS-8 use GCC 8, Fedora 32 GCC-10
          https://gcc.gnu.org/projects/cxx-status.html
          No, for practical purpose to use the already implemented part of C++17 this switch does make sense.
          BUT as std does not stand for "the entire standard" but only for "the published standard as is implemented with that version", it is currently not possible to write a useful program (not a `hello word' kind of `we know C++ now') completely after the standard of C++11/14 - from my point of view this is a shame.
          So for pedagogic reasons it is important to not mix different standards but to keep Modern C++ - and as many parts of C++11 and C++14 were made obligatory only with C++17 specification, those parts had not been implemented in GCC's C++ currently but will only be implemented when C++17 reaches full support by becoming the default.
          As former scientist I can not understand that situation - implementing C++20 when not even fulfilling C++11 seems to me ridiculous (and deprecated means "not to be used from now on" which seems to be treated differently concerning C++ standards), but that is currently the case.
          But don't get me wrong - the developers do a great job and they have a lot to do - so it is understandable that the shiny things come first - the things programmers are eager to use - and let those ugly standard library parts etc. wait till it has to be done.
          What I want to stress is that with C++17 being the new GCC default one should be able for the first time to write a non-trivial program in correct Modern C++.
          From my point of view a necessary starting point to really practically teach Modern C++.

          Comment


          • #6
            This entire post is word salad.

            Not possible to write a useful program? Not fulfilling C++11?

            What are you talking about?

            "many parts of C++11 and C++14 were made obligatory only with C++17 specification,"

            Eh? What are you talking about? What parts? What do you mean by obligatory?

            Comment


            • #7
              Originally posted by gufide View Post
              As far as I know, the C++17 isn't really complete yet. We are still missing some standard library bits such as from_chars with floating points and hardware interference size.
              That's less than ideal, sure. But those are some std C++ library deficiencies for some really lowlevel stuff you likely will always use though a convenience library (which will already have fallbacks).
              You will get alot neat stuff like more complete constexpr support, thats language level and cant be "fixed" otherwise.

              Comment


              • #8
                C++17 doesn't change much in terms of constexpr compared to C++14.

                Comment


                • #9
                  Originally posted by gufide View Post
                  We are still missing some standard library bits such as from_chars with floating points
                  I don't understand: from_chars seems to already have floating points support.
                  https://en.cppreference.com/w/cpp/utility/from_chars

                  Comment

                  Working...
                  X