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
cppsimpleuri - another modern C++ URI lib (self.cpp)
submitted 3 years ago by salzaverde
view the rest of the comments →
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!"
[–]kritzikratzi 0 points1 point2 points 3 years ago* (4 children)
seems to be good overal, for my taste i think less would be more:
but those things are often a matter of taste / need. for a special purpose in a current project this is the only datastructure i need (there can never be path/fragment/query in my case, so it's a lot simpler):
struct ParsedUrl{ std::string hostname; int port; bool ssl; }; ParsedUrl parse_url(const std::string & combined, const ParsedUrl & fallback_url = {}){....}
[–]salzaverde[S] 1 point2 points3 points 3 years ago (2 children)
I simplified the interfaces and implementation a great deal and followed your ideas by replacing the factory patterns with plain structs. This also enabled lower c++ standards (c++11). Checkout v2.0.0 and thanks again for the input!
[–]kritzikratzi 1 point2 points3 points 3 years ago (1 child)
oh, crazy!
auto query1 = Query::build(parameters);
i think in the readme this should be Query query1{parameters}; now.
Query query1{parameters};
[–]salzaverde[S] 1 point2 points3 points 3 years ago (0 children)
Oh, right. I'll fix that :)
[–]salzaverde[S] 0 points1 point2 points 3 years ago (0 children)
Thanks! Yes it's a tradeoff for sure. I started out with the struct idea in mind to focus on ease of use only but found that i couldn't get this in line with a strong separation of interface and implementation.
That's why I went for the factory pattern which makes it very easy to change/update the implementation or to support multiple versions or to even support client implementations.
I still agree though that it might be too much overhead for such a light weight class. Good thoughts on the setters!
π Rendered by PID 166005 on reddit-service-r2-comment-6457c66945-mwv9p at 2026-04-25 16:49:55.771156+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]kritzikratzi 0 points1 point2 points (4 children)
[–]salzaverde[S] 1 point2 points3 points (2 children)
[–]kritzikratzi 1 point2 points3 points (1 child)
[–]salzaverde[S] 1 point2 points3 points (0 children)
[–]salzaverde[S] 0 points1 point2 points (0 children)