What is the rationale for parenthesis in C++11's raw string literals R“(…)”?
问题 There is a very convenient feature introduced in C++11 called raw string literals, which are strings with no escape characters. And instead of writing this: regex mask("\\t[0-9]+\\.[0-9]+\\t\\\\SUB"); You can simply write this: regex mask(R"(\t[0-9]+\.[0-9]+\t\\SUB)"); Quite more readable. However, note extra parenthesis around the string one have to place to define a raw string literal. My question is, why do we even need these? For me it looks quite ugly and illogical. Here are the cons