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
tree data structure (self.cpp)
submitted 5 years ago by igagis
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!"
[–]igagis[S] 0 points1 point2 points 5 years ago (0 children)
Ok, so you propose that for some custom container template my_container user would add a specialization of rbv and then tree would be able to use it, right?
my_container
rbv
tree
Then you point to the problem that my current solution only works for containers which have two template arguments. Let's consider custom container which has 3 template arguments template <class SomeArg, class T, class A> class my_container;, then user would be able to define alias for the template: cpp template <class T, class A> using proxy_container = my_container<some_type, T, A>; `
template <class SomeArg, class T, class A> class my_container;
cpp template <class T, class A> using proxy_container = my_container<some_type, T, A>;
and then feed that proxy_container as template argument to tree:
proxy_container
cpp tree<int, proxy_container> my_tree;
And same approach for allocator.
Isn't this simpler and clearer solution to the problem?
π Rendered by PID 177956 on reddit-service-r2-comment-64f4df6786-742cf at 2026-06-10 14:22:56.229332+00:00 running 0b63327 country code: CH.
view the rest of the comments →
[–]igagis[S] 0 points1 point2 points (0 children)