1. 9
  1.  

  2. 12

    cries in a codebase thst is still prefixing its classes and interfaces with „ns“ for Netscape

    1. 4

      This is an advert for their clang-tidy-like tool but in spite of that the advice all looks good and I learned about a couple of C++20 features. We’re currently using concepts only optionally to let us build with slightly older compilers, so we can’t replace std::enable_if with them but I look forward to the day that this is no longer the case.

      1. 1

        This is an advert for their clang-tidy-like tool but in spite of that the advice all looks good…

        Yeah I was doubting to submit it, however, not just an ad, also code samples and rather technical contents, applicable to c++ users.

        For one project I’m still stuck with a pre c++ 11 compiler and for most others were on c++ 17, so that’s rather nice, the differences between the language versions almost make it two different languages. Don’t have much use for concepts in our codebase, yet.

        1. 1

          Were those c++17 codebases started that way or did you (or your team) update from 11 to 17? I’m asking because in a former job we wanted to do that but I’m not really sure how. If you touch a function/file, do you update everything in there? Or pick one feature and go through the whole codebase at a time?

          I only have experience in languages where there are breaking changes, so you do it in one swoop, so that’s easy because your compiler/interpreter will warn you. But 11 and 17 should be completely fine even in the same line…

          1. 2

            These codebases all are +20 years old, most of them modernized over time when the (hardware) vendor released a new compiler. Process is basically, try to compile it with a new compiler/standard and one by one, fix all compiler errors while maintaining the same behavior. Once it compiles with the new standard, add items on the backlog to modernize certain parts. Three years after we updated to C++14 we did a week-long ‘convert all char* to const char* or std::strings and fix ownership uncertainty’ project for example.

      2. 1

        As the article mentions, I found it surprising that Clang’s support for C++20 appears to be behind. I am trying to pick up some C++20 by doing advent of code, and found some solutions compile fine with MSVC but fail with Clang 13.

        It wasn’t many years ago that MSVC bundled a Clang compiler to better support recent standards.