Include )” in raw string literal without terminating said literal

Raw string literals let you specify an almost arbitrary* delimiter:

//choose ### as the delimiter so only )###" ends the string
R"###(  
    Some Text)"  
)###";  

*The exact rules are: “any member of the basic source character set except:
space, the left parenthesis (, the right parenthesis ), the backslash \,
and the control characters representing horizontal tab,
vertical tab, form feed, and newline” (N3936 §2.14.5 [lex.string] grammar) and “at most 16 characters” (§2.14.5/2)

Leave a Comment