6 ms·
Show HN: C++ Compiler Support Page
Hi HN,
I have created a webpage that displays all C++ features since C++20 in a simple, searchable table.
It is intended to serve as a quick reference for C++ developers, whether as support for cross-platform development or simply to track the current support status out of curiosity.
I created it as a simpler, more structured, and more up-to-date alternative to the cppreference compiler support site.
Please note that the page intentionally does not list LWG and CWG papers.
This might change as I am continually updating the site and trying out new ideas.
Questions, feedback and suggestions are appreciated, either here or in the form of GitHub issues.
- peapicker 1y agoMy gosh. I'm having to support some older platforms (like OS/400) who STILL don't have C++11 support. And also for now, HP-UX and Solaris, which support up to C++14 (dead platforms - hoping to drop soon). Someday maybe I'll get to move on.
- juliangmp 1y agoVery neat website! But it also really shows that C++ is bloated to hell
- cemdervis 1y agoThanks! I agree to an extent, but it's also the beast the industry married. So as long as it's around, we might as well "deal with it". This page is hopefully one tool that helps with that :)
- rs186 1y agoYou have to acknowledge that every feature in C++ (including the most insane ones) are well justified with real-life use cases in the industry. It is what it is. People who don't like it are using Go/Rust where it makes sense.
- EE84M3i 1y agoIs it possible to generate this automatically using conformance tests?
- cemdervis 1y agoHi! That's certainly possible, and also what I'm already doing. However, it's very time-consuming to do it for every single feature. The compiler vendors already provide their feature-support tables for most features, which I've made a small bot for that watches for conformance changes. For feature support that is unclear or not provided by the vendors, I write conformance tests to verify. In my experience, this mix works best.
- monax 1y agoHaving something like WPT [1] for C++ would be really nice. [1] https://github.com/web-platform-tests/wpt https://github.com/web-platform-tests/wpt
- bregma 1y agoThere are a handful of commercial offerings of C++ conformance test suites. They're all generally around 40000 euro for an evaluation copy (more for an actual full licensed copy), none are 100% complete, and we continually find bugs in tests. You're not going to find some hobbyist coming up with a useful conformance or coverage test suite for free. It's intensive, expensive, and arduous. Such things are mandatory, however, if you are a C++ vendor targeting ISO 26262 or IEC 61508 or similar -- basically, software that could kill you if it's done wrong. It's a niche with money and motivation.
- deleted 1y ago[deleted]
- Panzerschrek 1y agoHow did you collect this information? Manually by checking all compilers? By writing tests? By parsing compilers documentation?
- cemdervis 1y agoHi, I got the initial information from the cppreference compiler support site, then verified with each compiler vendors support tables and updated the information accordingly. Then I wrote a bot that watches all known (and most importantly, reliable) sources for changes, that then notifies me. The data itself is kept in very simple yaml files. So whenever something changes, I verify and update the info accordingly (The site itself is then regenerated and uploaded automatically). For features that are not fully implemented yet, or where the vendor does not provide any information (e.g. Apple's conformance table), I set up a conformance test suite on my machine that runs most of these across all toolchains. Please note that I won't be the only person that maintains this site. I'm in the process of open-sourcing and automating most of it, so that everyone can contribute via GitHub. It's just that keeping up with C++ is part of my job, and also a personal interest of mine. So I do this as a "labour of love".
- JonChesterfield 1y agoTrusting that the compiler docs correspond to reality is a bit of a risk here. I lost a bunch of my evening to gcc refusing to find glibc headers and the docs wouldn't have helped me there. I did find a wontfix bugzilla from 2020 though, so that's nice. The alternative would be to start stoically writing test programs and gradually reinvent part of autotools. Maybe run your conformance tests on the platforms that do have docs as well. Sounds like you may already be doing that :)
- Kelteseth 1y agoAny specific reason on why the project is closed source?
- cemdervis 1y agoHi, yes, it's just because I'm still trying out some design ideas and am polishing the code. I'm already in the process of open-sourcing it, so that everyone can contribute via GitHub PRs, it's just preparation work that has to be done.
- captain_coffee 1y agoNice! Just curious about one aspect: how much demand is there for C++ nowadays for new projects and what is the anticipated demand mid to long term [5+ years]? Asking as I am seriously considering if it would be a good idea to transition to C++ development (professionally, not as a hobby). Wondering if it would make sense from the POV of projected/anticipated future demand, job security and salaries (VERY important) - in the context of how bad the job market is at the moment.
- krior 1y agoC++ was and is reasonably popular, even when all new projects start using rust I guess there will be demand due to all the legacy code that cannot be rewritten. On the other hand you will be working with legacy C++, from what I heard its like selling your soul for job security.
- jll29 1y agoIf you care about job security and salary, I recommend specializing in maintaining COBOL legacy codebases for the financial services sector. There are not enough oldtimers alive to do it, and the younger guys refuse to learn it. That drove up the hourly salaries enormously.
- captain_coffee 1y agoI am non-ironically considering this as I probably have double-digit organizations within a radius of 10 miles that probably still have core systems in production written in COBOL.
- rs186 1y agoWhat about your sanity
- pjmlp 1y agoPlenty, because despite the noise around the alternatives, even those alternatives are built with help of GCC and LLVM, written in C++ and aren't getting any rewrite short term. Then there are whole industries where only C, C++ and Assembly matter, including standards, so it will take a while for new contenders to be taken seriously on such industries.
- devnullbrain 1y agoHow do you see someone using this page? Feature names tend not to be very approachable. They often use very precise terminology or refer to papers with names that are targeted for a very in-the-know population. As an example, one of the features listed is '`constexpr` `std::shared_ptr` and friends'. You seem to have a search that can cope with backticks but this feature doesn't show up if I search for 'constexpr shared_ptr'. That can be solved technically, but the bigger problem is that this feature also changes things for `weak_ptr` - or 'smart pointers' as a concept. I can't picture a situation where I end up wanting to know the status of that feature's implementation in isolation. For what it's worth, cppreference isn't any better at this, since it doesn't have any notes on the addition of support for `constexpr`ness of either pointer type. But with enough will I can change that.
- cemdervis 1y agoHi, I first designed this site as a way for C++ developers to quickly look up support for particular features (as you've described, in isolation). But in the long run, I think we can extract much more meaning out of these numbers, which is why I added the conformance overview as a first test candidate. As for feature names: I agree that the paper titles tend to be very technical / niche. However, I didn't want to distort them and rename them, since the site is targeted at the in-the-know population you've mentioned. Do you have an idea how this could be improved? Regarding the search: This is something I'm working on improving, so that coarse searches like "constexp sharedptr" would correctly yield the constexpr std::shared_ptr proposal.
- tempodox 1y agoVery handy, I love it. Linking the pertaining proposals is the pinnacle, since they explain each feature in detail.
- cemdervis 1y agoThank you very much, I also plan to add more information to the information section of each feature, so that people have the option to TL;DR instead of heading over to the proposals.
- lainzhow 1y agoNeat tool, but I noticed it shows that modules are mostly supported when they are at best partially supported. You can double check with the famous "Are we modules yet?" website.
- cemdervis 1y agoHi, thanks. I agree, modules support is kind of there, but not really. I think we could only go by what the compiler vendors state, and add some notes about what's missing.
- wscott 1y agoFor reference here is the cppreference page the OP is trying to improve: https://cppreference.com/w/cpp/compiler_support.html https://cppreference.com/w/cpp/compiler_support.html Personally I am not not sure the live search on this new page saves me time, but perhaps if you added the ability to only show missing features it could be useful. For example if I could pick that I am interested in c++23 and earlier and that I use gcc-14 and clang-16 it should list the features that won't work for me. That would be useful compared to trying to scan the full list.
- cemdervis 1y agoHi, the live search is for developers that want to quickly look up the support for a particular feature. The "missing features" feature and filtering by compiler versions is something I'm currently working on. Any suggestions are welcome, and thanks for your feedback.
- butterisgood 1y agoThis is really nice! I have not been keeping up with the features as I used to. "delete with a reason" strikes me as a really good idea.