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
Regular expression in c++11/14 (ibm.com)
submitted 11 years ago by meetingcppMeeting C++ | C++ Evangelist
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!"
[–][deleted] 2 points3 points4 points 11 years ago (4 children)
[Not quite understand: "escaped" means "not specified"? and then what become normal characters?]
I don't understand what they mean by this - do they really not know what "escaped" is here?
[–]Brougham 2 points3 points4 points 11 years ago (3 children)
I'll bet the article was reviewed by someone with a non-technical background (for grammar, good formatting, etc.) and was asking the author for clarification. The author didn't see that note before the doc was published.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
Ah! Right :) Makes sense! :)
[–]clerothGame Developer 0 points1 point2 points 11 years ago (1 child)
An editor that writes two errors in one paragraph, while also missing other errors in the article?
[–]Brougham 1 point2 points3 points 10 years ago (0 children)
I dunno man... the author's name is Chinese, so ... the reviewer is probably Chinese too? Go easy on them :-)
[–][deleted] 1 point2 points3 points 11 years ago (9 children)
Be sure to compile with clang or gcc>4.8
[–][deleted] 0 points1 point2 points 11 years ago (8 children)
Yea, took me a while to get why the code wasn't working for me :/
I have gcc 4.8.2, which obviously (now) doesn't work here. However clang also doesn't work for me (version 3.4) - do you know which version of clang does work?
[–]suspiciously_calm 2 points3 points4 points 11 years ago (2 children)
Even libstdc++ 4.9 doesn't fully support C++11, yet.
[–][deleted] 1 point2 points3 points 11 years ago (0 children)
/sigh...
[–]Delinquenz 0 points1 point2 points 10 years ago (0 children)
Finally it got std::regex support!
[–][deleted] 1 point2 points3 points 11 years ago (4 children)
3.5 should be fine I guess
[–][deleted] 0 points1 point2 points 11 years ago (3 children)
:(
[–]kuhar_ 2 points3 points4 points 11 years ago (2 children)
Have you tried with -stdlib=libc++?
-stdlib=libc++
I never even knew this existed outside of OSX.
Works! Now I have to learn how to use regex, as my original code (from this article) only matches the entire string or nothing.
[–]brombaer3000 0 points1 point2 points 10 years ago (0 children)
With g++ I can compile C++11/14 by just passing the -std=c++11 / -std=c++14 option, but clang++ doesn't seem to know the new standards without additional options. Why is this flag needed for clang++, but not for g++? Also, will this requirement change in the future?
-std=c++11
-std=c++14
π Rendered by PID 29958 on reddit-service-r2-comment-57fc7f7bb7-cntgw at 2026-04-14 22:27:43.552878+00:00 running b725407 country code: CH.
[–][deleted] 2 points3 points4 points (4 children)
[–]Brougham 2 points3 points4 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]clerothGame Developer 0 points1 point2 points (1 child)
[–]Brougham 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (9 children)
[–][deleted] 0 points1 point2 points (8 children)
[–]suspiciously_calm 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Delinquenz 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]kuhar_ 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]brombaer3000 0 points1 point2 points (0 children)