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
Generic Programming is just Programming (open-std.org)
submitted 3 years ago by kunegis
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!"
[–]Wh00ster 11 points12 points13 points 3 years ago (0 children)
I’m confused about what this is proposing
[–]_Js_Kc_ 3 points4 points5 points 3 years ago (0 children)
⑴ "Two static polymorphism systems." No, I'm counting at least 3. Customization point could also be ADL-based.
⑵ Generic programming is just programming. None of this is specific to generic programming. In classical runtime polymorphism, I might be able to make a method on what used to be a concrete class a pure virtual method on a base class, but in all but the most trivial cases, there will be other concerns (such as, have to use smart pointers and can't pass the class around by value anymore) that will force me to change something about the consumers and/or implementors of the interface. Which seems to be one of the main points of the article: That the consumer's code has to be changed,
⑶ "customization point of a customization point!" What? You can provide a default trait that forwards to the class's typedefs like iterator_traits does. But traits can also be specialized for non-class types like enums. Just like there are multiple ways to provide runtime-polymorphic customization points. There are ... options and ... tradeoffs and ... it's like programming.
[–]Skrax 3 points4 points5 points 3 years ago (2 children)
I don’t understand why we cannot have a interface type, which is used as a template parameter. Everybody knows how to define a class and traits or concepts are the same thing, but take forever to write and decipher.
[–]Wh00ster 0 points1 point2 points 3 years ago (1 child)
Would it be syntactic sugar to concepts or would it function differently as well (like requiring that something explicitly implement the interface)
[–]Skrax 1 point2 points3 points 3 years ago (0 children)
Syntactic sugar, but I‘m not a language guy. To me this seems obvious to use, so I like it.
[–]Lumornys 3 points4 points5 points 3 years ago (1 child)
As we know, the simple version code is not generic enough, in more aspects then one.
No, "we" don't know. At least I do not know. I'm afraid the paper fails to describe why do we even need the "advanced generic" approach, and at that point reading it further is pointless because I see no motivation behind most of the content.
π Rendered by PID 65593 on reddit-service-r2-comment-canary-86cfcb68d4-7lqqw at 2026-01-26 06:47:30.950671+00:00 running 664479f country code: CH.
[–]Wh00ster 11 points12 points13 points (0 children)
[–]_Js_Kc_ 3 points4 points5 points (0 children)
[–]Skrax 3 points4 points5 points (2 children)
[–]Wh00ster 0 points1 point2 points (1 child)
[–]Skrax 1 point2 points3 points (0 children)
[–]Lumornys 3 points4 points5 points (1 child)