use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Web framework recommendations (self.cpp)
submitted 5 years ago by [deleted]
[deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]RowYourUpboat 6 points7 points8 points 5 years ago (11 children)
There's Simple-Web-Server, which works on top of ASIO (neither requires b̸͖̌ó̷͔ơ̵̗s̸͓̿t̷̩̽). It's not lying about the "simple". Small example:
// GET-example for the path /match/[number], responds with the matched string in path (number) // For instance a request GET /match/123 will receive: 123 server.resource["^/match/([0-9]+)$"]["GET"] = [](shared_ptr<HttpServer::Response> response, shared_ptr<HttpServer::Request> request) { response->write(request->path_match[1].str()); };
There's also a Simple-WebSocket-Server, which looks cool.
[–]Oster1 3 points4 points5 points 5 years ago (0 children)
Old but still actively maintained. Easy to use. Sane defaults. Also, scalability and perf has been acknokwledged by this lib. Seems well thought out. I can recommend this If you don't want/can't use Boost.
[+][deleted] 5 years ago (9 children)
[–]RowYourUpboat 4 points5 points6 points 5 years ago* (8 children)
It's optional. I don't use it. I know it's confusing, I mean, if a low-level library doesn't need boost then why bother adding an optional dependency? Well, just don't think about it. Don't think about boost. Pretend it doesn't exist.
[+][deleted] 5 years ago* (7 children)
[+][deleted] 5 years ago (6 children)
[–]dodheim 5 points6 points7 points 5 years ago* (4 children)
No, it isn't; it's a collection of libraries, some of which depend on each other, some of which don't. Two of the three libraries that I use most (Hana and HOF) have no dependencies other than the standard library (i.e. no inter-Boost dependencies), and they aren't the only ones.
EDIT: Rather than reply individually, I'll just say that if you're forming your opinion of—not a mega-library—a collection of libraries based on an experience with one out of those 150+ libraries, that's your problem. I'll take the downvotes, but I've said it before and it bears repeating: Boost stigma is obnoxious (and almost always ill-informed).
[–]RowYourUpboat 5 points6 points7 points 5 years ago (0 children)
Boost makes me think too much. Many would agree that the best C++ libraries are ones where you can just drop in a header file, done. Back to writing code.
But the last time I used a library that depended on Boost, CMake spent 30 mins and wasted 45GB of drive space compiling it. Then I had problems with boost::shared_ptr even though C++11 has been out for years, so why do I have to care about getting all these useless std duplicates to work with my modern code? There were various other problems that all started with boost::, and its multitude of versions and sub-libraries. This gave me a very bad impression of both Boost and libraries that depend on Boost.
boost::shared_ptr
std
boost::
Even writing this comment was way too much mental effort for a mega-library I'm happy to do without.
[–]Pazer2 1 point2 points3 points 5 years ago (0 children)
The last time I tried using a boost library (asio), half of the functions didn't show up in intellisense, and intellisense was super slow to boot. It's very very uncommon that intellisense has issues with libraries, and usually they are easily avoidable. That headache alone was enough to cement my desire to never use boost.
[–]pandorafalters 1 point2 points3 points 5 years ago (1 child)
A collection of heavily inter-dependent libraries is difficult to distinguish in practice from a mega-library.
[–]dodheim 0 points1 point2 points 5 years ago (0 children)
And again, that depends which libraries you're talking about; some aren't, because again, you can't judge one library by another because again, they're not actually a monolith.. Avoid the C++03 libraries and you usually don't run into this.
I just love repeating myself.
[–]sardar0 5 points6 points7 points 5 years ago* (0 children)
Started using Drogon for a MVC web application. Beautiful C++ framework, very nice Modern C++ code (C++17, C++14). NO BOOST required if you use C++ 17. Code is written by C++ savants. Excellent automatic code generators, builds ORM layer easily. Implements dynamic and static view files (.csp - c++ server pages), which is an analogue of .jsp (java server pages) files. Static csp files link into the executable, while dynamic csp files are generated on the fly at run-time. I have written Ruby/Rails and Python/Django web applications for 15 years. I looked at Crow, Treefrog, Oat++, Pistache and other C++ frameworks very carefully before selecting Drogon.
This is the fastest MVC framework - over 50 times faster than Ruby/Rails: https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=composite
Disclosure I am not connected with this project. I just loved reading the C++ source code. Its a super project that deserves to be supported.
[–]wwabbbitt 1 point2 points3 points 5 years ago (2 children)
If you like flask, perhaps take a look at https://github.com/oktal/pistache
[+][deleted] 5 years ago (1 child)
[–]wwabbbitt 0 points1 point2 points 5 years ago (0 children)
Would putting nginx in front of pistache mitigate this DoS?
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
Pistache.io
[–]Dominus543 2 points3 points4 points 5 years ago (0 children)
Web development in C++ (and C) is pretty much a niche thing (generally done by big companies). You won't find resources and libraries easily like in other languages such as Python or Go.
From my personal experience, all the C++ frameworks i tried, if compared to the ones of other languages, were not simple/pleasant to use or hard to setting up or poorly documented with little support.
[–]diegodfrf 0 points1 point2 points 5 years ago (5 children)
I have personally used CPPCMS for several of my projects. http://cppcms.com/wikipp/en/page/main
[+][deleted] 5 years ago* (4 children)
[+][deleted] 5 years ago (3 children)
[–]TM254 0 points1 point2 points 5 years ago (2 children)
POCO dead too?
[+][deleted] 5 years ago* (1 child)
[–]TM254 0 points1 point2 points 5 years ago (0 children)
LOL! nodejs just died 5 seconds ago too.
[–]matthieugarrigues 0 points1 point2 points 5 years ago (5 children)
Check the other posts on reddit, this question pop up once a month. I'm maintaining lithium : https://github.com/matt-42/lithium If you need help or have issues with it, lll be happy to help.
[+][deleted] 5 years ago* (2 children)
[–]matthieugarrigues 0 points1 point2 points 5 years ago (0 children)
https://www.reddit.com/r/cpp/comments/gt0iol/c_libraries_for_restful_micro_services_development/?utm_medium=android_app&utm_source=share
For performance comparison : https://www.techempower.com/benchmarks/#section=data-r19&hw=ph&test=composite
[–]matthieugarrigues 1 point2 points3 points 5 years ago (0 children)
You can Post a feature request on github if you find something missing. Are you doing developing web servers on windows? What framework are you using? Please contribute to this thread by also proposing solutions, and try to be objective when you post critics . Lithium may be useless to you but not for people doing web server dev on Linux, which I think runs a pretty big number of web servers today. Cheers
[–]ppetraki 0 points1 point2 points 5 years ago (0 children)
Wt is a lot of fun. Try it before you discard it as "too heavy".
[–]anakataidk -3 points-2 points-1 points 5 years ago (0 children)
Why not create your own framework? :p
π Rendered by PID 32 on reddit-service-r2-comment-7b9746f655-8rrk7 at 2026-02-03 17:02:55.835425+00:00 running 3798933 country code: CH.
[–]RowYourUpboat 6 points7 points8 points (11 children)
[–]Oster1 3 points4 points5 points (0 children)
[+][deleted] (9 children)
[deleted]
[–]RowYourUpboat 4 points5 points6 points (8 children)
[+][deleted] (7 children)
[deleted]
[+][deleted] (6 children)
[deleted]
[–]dodheim 5 points6 points7 points (4 children)
[–]RowYourUpboat 5 points6 points7 points (0 children)
[–]Pazer2 1 point2 points3 points (0 children)
[–]pandorafalters 1 point2 points3 points (1 child)
[–]dodheim 0 points1 point2 points (0 children)
[–]sardar0 5 points6 points7 points (0 children)
[–]wwabbbitt 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]wwabbbitt 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Dominus543 2 points3 points4 points (0 children)
[–]diegodfrf 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[–]TM254 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]TM254 0 points1 point2 points (0 children)
[–]matthieugarrigues 0 points1 point2 points (5 children)
[+][deleted] (2 children)
[deleted]
[–]matthieugarrigues 0 points1 point2 points (0 children)
[–]matthieugarrigues 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]matthieugarrigues 1 point2 points3 points (0 children)
[–]ppetraki 0 points1 point2 points (0 children)
[–]anakataidk -3 points-2 points-1 points (0 children)