Quick Q: Can I use a const std::regex from two threads without synchronization? -- StackOverflow

Quick A: See GotW #6a. The answer is the same for any object, not just regex.

Concurrently using std::regex, defined behaviour?

[...] I can't find anything which states whether using a const std::regex concurrently results in undefined behaviour or not. As far as I can tell, no edits are being made to the regex object so no undefined behaviour should be induced by using it concurrently?

Thanks in advance!

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.