Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Microsoft Visual C++ is the Internet Explorer of C++ compilers.

Microsoft Visual C++ is the Internet Explorer of C++ compilers.

Scheduled Pinned Locked Moved The Lounge
c++question
38 Posts 10 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    C++ compiler support - cppreference.com[^] While the MSVC compiler has improved significantly in recent years it still lags: Note all the asterisks next to the C++20 library and language features. The bottom line is those are partial or otherwise "supported with qualifications" which at the end of the day means your standard C++20 code might not compile for MSVC without conditional compiles. Like I said, it has gotten better, but so did internet explorer before it was replaced. I prefer to be able to use -std=C++20 and be confident that my standard code will compile, or if it won't, then it's *my fault* - metaprogramming is difficult enough when you know what you're using is fully supported. If it's not, tracking down the error can be a nightmare - I speak from unfortunate experience. Additionally, the fact that MSVC consistently lags behind in standards support by years (i'm not saying lags behind other compilers, I'm saying lags behind the standard itself) means if I want my code to compile across compilers I have to dumb it down for the lowest common denominator. And between the major compilers, that lowest common denominator comes up as MSVC. I guess some compiler had to fill that role, but they were going to be my target whoever they were, because they're going to be the reason that I can't have nice things.

    Real programmers use butterflies

    S Offline
    S Offline
    SeattleC
    wrote on last edited by
    #27

    Most of those asterisks seem to just show a different kind of version number. 20 years ago, MSVC lagged seriously behind the standard (I'm talkin' to you MSVC 6). Today, conformance is excellent, though for a given feature it may take longer to get into MSVC than the open-source compiler in which the feature was prototyped (duh). I'm comparing compilers for a book on optimization, and so far I haven't encountered a situation in which the three compilers didn't all support a feature, though I accept that they exist. There are in fact differences in the way the compilers interpret the standard, but this has always been more a bug in the standard than in any of the compilers, or a situation in which one compiler accepts a more generous (nonconforming) syntax than another.

    H 1 Reply Last reply
    0
    • K Kiriander

      You can run MSVC++ in C++17 mode, unlike IE which only got standards mode in betas, but not in releases.

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #28

      Fair enough. But C++20 support is still flaky

      Real programmers use butterflies

      K 1 Reply Last reply
      0
      • S SeattleC

        Most of those asterisks seem to just show a different kind of version number. 20 years ago, MSVC lagged seriously behind the standard (I'm talkin' to you MSVC 6). Today, conformance is excellent, though for a given feature it may take longer to get into MSVC than the open-source compiler in which the feature was prototyped (duh). I'm comparing compilers for a book on optimization, and so far I haven't encountered a situation in which the three compilers didn't all support a feature, though I accept that they exist. There are in fact differences in the way the compilers interpret the standard, but this has always been more a bug in the standard than in any of the compilers, or a situation in which one compiler accepts a more generous (nonconforming) syntax than another.

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #29

        I'm guilty of glossing over most of that link. My fault. Serves me right for digging it up while in the middle of other things.. I admit a lot of my distaste for MSVC is historical. Pre 2017 it wasn't great, but since then I haven't used it as much as I used to because I do cross compiling mostly these days for MCUs and such. That it didn't support SFINAE was just unacceptable, IMO. At the end of the day, I don't trust their compiler products, and frankly, they earned that. It will take some time - a consistent showing of compliance over several standards versions for me to want to rely on them again.

        Real programmers use butterflies

        1 Reply Last reply
        0
        • H honey the codewitch

          Yeah but look at their C++20 support compared to GCC. Someone should remind MS it's 2021. I don't want to have to find out they don't support something the hard way when I'm in the middle of coding. I'm not using C++20 at the moment, but I plan on switching over soon. If MS has been consistent about anything, it's being years behind the standards. So I stand by the title of the post Also if a codebase won't work with GCC I'd argue the problem is almost certainly with the codebase, not gcc. Because 1. GCC is a modern, popular compiler that is very standards compliant compared to other offerings. If your source can't work with it you're shooting yourself in the foot 2. What about your code isn't actually C++, but really a variant of C++ involving vendor specific extensions? It's not always the issue, but I find it usually is.

          Real programmers use butterflies

          P Offline
          P Offline
          Peter Adam
          wrote on last edited by
          #30

          And you really want to fight the new compiler bugs? It is only the second bugfix for VS 2017 that does not contain a C++ compiler fix - I guess they gave up, not finished.

          H 1 Reply Last reply
          0
          • P Peter Adam

            And you really want to fight the new compiler bugs? It is only the second bugfix for VS 2017 that does not contain a C++ compiler fix - I guess they gave up, not finished.

            H Offline
            H Offline
            honey the codewitch
            wrote on last edited by
            #31

            I don't typically use MSVC. In fact, I don't even test my code to see if it compiles on MSVC anymore - just clang and gcc. If MSVC can't compile it, MSVC is broken, as far as I'm concerned. That's how I treat it.

            Real programmers use butterflies

            P 1 Reply Last reply
            0
            • H honey the codewitch

              I don't typically use MSVC. In fact, I don't even test my code to see if it compiles on MSVC anymore - just clang and gcc. If MSVC can't compile it, MSVC is broken, as far as I'm concerned. That's how I treat it.

              Real programmers use butterflies

              P Offline
              P Offline
              Peter Adam
              wrote on last edited by
              #32

              But... gcc is broken, too[^].

              H 1 Reply Last reply
              0
              • P Peter Adam

                But... gcc is broken, too[^].

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #33

                I think you misunderstand me. All compilers have bugs. The question is whether standards compliant code will compile with them or not. Sure, gcc has some bugs, and some of those bugs might impact the above, but they have a lot of catching up to do if they want to ride the Microsoft fail train. This was especially true on previous versions of MSVC, but even today they're still lagging behind clang and GCC in terms of C++ standards support. At the end of the day, that's what I care about. Like, as an analogy (but i don't do webdev) I don't care that Chrome may have a rendering bug. I care that it supports HTML5, so that my HTML5 code will theoretically render capably under that system. If there's a specific bug I can deal with that, but that's knowing that Google knows it's a bug and is treating it like a bug. Consider the different approach MS took with IE. It mirrors their treatment of C++ in terms of standards. Microsoft's lack of standards compliance isn't treated as a bug. At least historically (which I can speak to with confidence, as opposed to their specific culture and attitude *today* WRT to C++) has been that it's by design, and if you code in the Microsoft ecosystem, you just have to suck it up. Maybe they'll get around to it on the next major version, maybe not. That's a rather marked difference in terms of what I can expect and what I can rely on when I go to design my code. In the first case, worst case I have a conditional for Chrome, to work around the bug, and make a note of it in the source. In the second case, I basically have to fork, because not only is it not going to be fixed, but it's probably not the only thing they *decided* to do differently.

                Real programmers use butterflies

                1 Reply Last reply
                0
                • L Lost User

                  Quote:

                  cl.exe is a tool that controls the Microsoft C++ (MSVC) C and C++ compilers

                  And cl is the command I use for compiling in VSCode; nothing visual about it (except when my simple mistakes get spat out. :(( ).

                  R Offline
                  R Offline
                  Richard FR
                  wrote on last edited by
                  #34

                  Text like a command line is also "visual"

                  L 1 Reply Last reply
                  0
                  • H honey the codewitch

                    Fair enough. But C++20 support is still flaky

                    Real programmers use butterflies

                    K Offline
                    K Offline
                    Kiriander
                    wrote on last edited by
                    #35

                    Indeed. C++20-support in MSVC++ is labeled experimental. As it is for Clang and GCC. Ok, Clang calls it's status "partial", but that doesn't read any better than "experimental".

                    H 1 Reply Last reply
                    0
                    • R Richard FR

                      Text like a command line is also "visual"

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #36

                      I never claimed otherwise.

                      1 Reply Last reply
                      0
                      • K Kiriander

                        Indeed. C++20-support in MSVC++ is labeled experimental. As it is for Clang and GCC. Ok, Clang calls it's status "partial", but that doesn't read any better than "experimental".

                        H Offline
                        H Offline
                        honey the codewitch
                        wrote on last edited by
                        #37

                        From CPPreference.com's compiler support page (i don't have the link handy, sorry), GCC's C++20 support looks pretty good. Are you looking at v10 or are you considering an earlier version?

                        Real programmers use butterflies

                        K 1 Reply Last reply
                        0
                        • H honey the codewitch

                          From CPPreference.com's compiler support page (i don't have the link handy, sorry), GCC's C++20 support looks pretty good. Are you looking at v10 or are you considering an earlier version?

                          Real programmers use butterflies

                          K Offline
                          K Offline
                          Kiriander
                          wrote on last edited by
                          #38

                          [C++ Standards Support in GCC- GNU Project - Free Software Foundation (FSF)](https://gcc.gnu.org/projects/cxx-status.html#cxx20)

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups