Skip to content

C++: add 'Raw String Literal Prefix' style and restricts the style of invalid raw string

As suggested in !567 (merged), split "Raw String Delimiter" into "Raw String Literal Prefix" and "Raw String Delimiter".

Before:

foo(R"", 42);
//  ~~        Raw String Delimiter
//    ~~~~~~~ Error
foo(R"a(bla bla)a", 42);
//  ~~~~       ~~~ Raw String Delimiter
//      ~~~~~~~    Raw String

Now:

foo(R"", 42);
//  ~   Raw String Literal Prefix
//   ~~ Error
foo(R"a(bla bla)a", 42);
//  ~              Raw String Literal Prefix
//   ~~~       ~~~ Raw String Delimiter
//      ~~~~~~~    Raw String

Merge request reports

Loading