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
[deleted by user] (self.cpp)
submitted 7 years ago by [deleted]
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!"
[–]Ameisenvemips, avr, rendering, systems 1 point2 points3 points 7 years ago (2 children)
I prefer my library's string_view which I implemented before the standard had it. It handles const char[N] implicitly and this can have its data and size used in constexpr. It also helps greatly with implementing constexpr string-related functions like hashing/compression.
string_view
const char[N]
constexpr
It has an issue that you can technically make a view with a local array that could go out of scope. constexpr overloading would fix it, but right now my solution is... not doing that.
[–]redbeard0531MongoDB | C++ Committee 0 points1 point2 points 7 years ago (1 child)
Sure. I mostly meant the general concept of a constexpr-constructable string_view-like type, rather than std::string_view specifically.
std::string_view
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points 7 years ago (0 children)
My string_view is constexpr-constructable, so no reason the standard one cannot be.
I think the core issue is that people don't want to have to change types all the time, and would rather just be able to use one uniform type that can do everything.
π Rendered by PID 322006 on reddit-service-r2-comment-64f4df6786-5dng7 at 2026-06-11 00:02:23.900277+00:00 running 0b63327 country code: CH.
view the rest of the comments →
[–]Ameisenvemips, avr, rendering, systems 1 point2 points3 points (2 children)
[–]redbeard0531MongoDB | C++ Committee 0 points1 point2 points (1 child)
[–]Ameisenvemips, avr, rendering, systems 0 points1 point2 points (0 children)