Is there any full/correct implementation available (right now) for C++11 regex?
Note on Compiler support vs. Library support:
Compiler Support = compiler recognizes any new syntax added to the language for the feature in question. Code utilizing the new feature added to your program will compile.
Library Support = library updated to actually implement the feature. Code added to your program and linked to the library will work.
*Edit: I've updated this summary with new information and moved it into an answer below.
Per stack exchange policy about it being ok to answer your own question I am updating the summary part of the question with new info and moving it into this answer.
GCC: Does not provide a working regex
until GCC 4.9.0
Clang: Compiles regex
Standard Library:
MSVC: Regex works since MSVC 2010 (Per answer from @Laurent and associated up votes)
Boost: C++11 regex is "based on" or "modeled after" Boost. I take that to mean not exactly the same. If there is a definitive list of differences please comment with a link.
I've used the <regex>
module since MSVC 2010 and it worked perfectly for my need (using the doc from cplusplus.com).
So if you intend to develop on a Windows environment, I would recommend opting for MSVC 2010 or 2012. It works out of the box !
Clang is C++11 feature complete. You can check which feature is available in which version here: Clang C++11 features
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With