Announcement

Collapse
No announcement yet.

GCC 10 Has C++20 Concepts Support In Order

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

  • GCC 10 Has C++20 Concepts Support In Order

    Phoronix: GCC 10 Has C++20 Concepts Support In Order

    The original C++ Concepts technical specification has been supported by the GNU Compiler Collection since GCC 6, but for GCC 10 the latest C++20 enablement is supporting that refined version of this feature...

    http://www.phoronix.com/scan.php?pag...ncepts-Support

  • #2
    What do developers think about this?

    Comment


    • #3
      Originally posted by timofonic View Post
      What do developers think about this?
      I guess you mean the concepts in C++ rather than its support in gcc.

      The most permissive templates in the standard library will probably continue to spit pages and pages of error messages, hopefully with more descriptive information (but I'm not entirely sure...). The real advantage comes when they are used to impose strict constraints on the template parameters, so it's up to the libraries implementers to make them useful.

      Comment


      • #4
        Originally posted by timofonic View Post
        What do developers think about this?
        One of the most useful additions in a long time, the only downside is that is more or less a "breaking change", means unless you drop support of earlier versions you will have the template declaration twice.
        I guess the most important stuff for C++20 is contracts, concepts and modules. Every one of them brings big changes, dropping alot of endlessly reinvented schemes for a clean replacement - and don't have easy fallbacks if you use them correctly.
        The language can improve massively with them, but I guess it will be until another revision until there is enough inertia until devs will fully utilize those.

        Btw, if you aren't a developer, why do you ask?

        Comment


        • #5
          Originally posted by discordian View Post
          I guess the most important stuff for C++20 is contracts, concepts and modules.
          I'm afraid that contracts didn't make it into C++20.

          Comment


          • #6
            Originally posted by klapaucius View Post

            I'm afraid that contracts didn't make it into C++20.
            And modules look muddy with three incompatible implementations, and will likely require at least one more standard iteration before it is can be used by cross-platform code.

            So just concepts.

            Comment


            • #7
              Originally posted by klapaucius View Post
              I'm afraid that contracts didn't make it into C++20.
              Yikes, I thought I remember this being far along and accepted. I would then consider C++23 (or whatever's next) to be my breaking point when I drop C++11/c++17 fallbacks. Concepts alone dont warrant this for me.

              Comment


              • #8
                C++ concepts is equivalent to traits in Rust, right?

                Comment


                • #9
                  Originally posted by andreano View Post
                  C++ concepts is equivalent to traits in Rust, right?
                  The idea is very similar.

                  Comment


                  • #10
                    Originally posted by timofonic View Post
                    What do developers think about this?
                    templates without concepts are like void pointers in c

                    Comment

                    Working...
                    X