r/cpp • u/HxSigil • Mar 03 '26
Built a static C++ reference site on top of cppreference
I've been experimenting with different ways to navigate C++ reference material and ended up building a static reference site on top of the cppreference offline dump: https://cppdocs.dev
This is NOT a replacement for cppreference. All core reference data comes from it, this is more of a usability/navigation layer.
Things I added:
- Version filtering (C++11 → C++26)
- Fully static, minimal JS
- Fast static search
- Task-oriented entry points (Ranges, Algorithms, Headers, etc.)
- Domain-based browsing (memory model, concurrency, compile-time stuff)
- Built-in bookmarks
- Spotlight-style page switcher
- Optional vim-style keybindings (
gg, etc.)
The main problem I kept running into was knowing rougly what I needed but not remembering the exact name or header. Cppreference is fantatsic but can feel like a raw dump sometimes. This is an experiment in adding more structure and cross-linking to make it easier to explore
Content is Markdown-first, contributions are just simple PRs. Version metadata comes from cppreference so it's not perfect everywhere yet.
Broken pages, missing stuff, confusing summaries --> issues and PRs welcome.
Repo: https://github.com/cppdocs/cppdocs Hosted on GitHub Pages.
61
u/anton31 Mar 03 '26
cppreference is dying. It has been in read-only state for about a year, and the sole maintainer may or may not get to properly updating it in the future. We need some new project that forks cppreference material, hosts on Github pages and allows further contributions via commits.
This specific project in its current state, though, is far from being able to take on the role of a successor. Was it converted from cppreference material? Pages are highly incomplete compared to cppreference, looking at e.g. std::optional.
17
u/KiwiMaster157 Mar 04 '26 edited Mar 04 '26
Personally, I prefer the layout/formatting of cppreference, but I do appreciate the effort to make the presentation more approachable for newer developers. I'm sure there's a happy medium somewhere.
There are a few issues I noticed while looking around:
std::rangesnamespace from your algorithms page.std::ranges::containspage: "Up until C++20, we’ve had to write std::ranges::find(r, value) != std::ranges::end(r) to determine if a single value is inside a range." This implies the range algorithms were around before C++20.Not saying all this to be mean. This seems like a great effort for the community to rally behind.
2
u/Global_Watercress907 Mar 04 '26
Wow, I was thinking of doing something like this, awesome that I do not have to do it!
Three things that I think most modern documentations have and I think it would be really useful to implement it here (I recently transitioned from web technologies such as Laravel and React and both have it. Laravel has IMO superior docs):
But otherwise this is awesome! Miles ahead of cppreference in terms of design and legibility! Love this!
8
u/raplonu Mar 03 '26
Thank you for doing that. New approaches are always welcome. I recommend you to share your work with other C++ communities too like the #include <C++> discord (they have a cppreference channel) or the Cpplang slack workspace.
8
u/__cinnamon__ Mar 04 '26
Nice. The way easy summaries are so buried between template explosion nonsense and the highly technical stuff on CPP reference has been endlessly frustrating to me. Often all I want is to know something exists and what it does at a high level then to mess around with it myself.
7
u/CompetitivePop-6001 Mar 04 '26
This is actually really cool. I love cppreference but yeah, sometimes it does feel like digging through a giant wiki dump. The version filtering + task-based entry points sound super useful. Definitely bookmarking this
6
u/Alvaro_galloc Mar 03 '26
This could be so helpful for developers now that cppref is in decline. Do you have future plans for this? Or is it going to stay an alternative front end ??
1
u/buovjaga Mar 06 '26
Thank you for your effort. If I can request something: make your commits smaller, so it's easier to examine the history and find regressions down the line.
3
u/dirtymint Mar 05 '26
Thank you for making this, it's so much nicer to look at and find navigating it much easier 👍
2
u/Environmental_Lab_29 Mar 07 '26
Great work! Though cpp-reference is definitely good work and deserves our appreciation, we must admit it's not ergonomic. Happy to see something much user-friendly and modern!
2
u/chibuku_chauya Mar 08 '26
Cppreference is one of the ugliest sites I’ve ever seen with atrocious accessibility to boot. This is much better.
1
u/jonspaceharper Mar 04 '26
Good project. The feedback is good and the concept has lots of merit.
1
u/IsThisWiseEnough Apr 29 '26
Very Nice work. One improvement could be adding a shortcut link to specific page in cppreference to switch with ease.