← every case · 2000 · string forms
a C++ raw string that puts a word of its own between the R" and the bracket, and then ends only at that same word. The closer is chosen where the string is written, so no fixed list of symbols can say what ends this one
| 1 | codecodecodecodecode | const char *raw = R"xy(a lone " quote and |
| 2 | codecodecodecodecode | /* this opens nothing, it is inside the raw string |
| 3 | codecodecodecodecode | )xy"; |
| 4 | codecodecodecodecode | printf("done"); |
stringcommentthe tag around another language
cloc --json cases/2000-string_forms/2150-delimited_raw_string_names_its_own_closer/input.cpp
the plain R"( is declared and this delimited form is not, so the block opener inside the string opens a comment
mezura cases/2000-string_forms/2150-delimited_raw_string_names_its_own_closer/input.cpp --output json --hide timing --counting content
the plain R"( is declared and this delimited form is not, so the block opener inside the string opens a comment
mezura cases/2000-string_forms/2150-delimited_raw_string_names_its_own_closer/input.cpp --output json --hide timing --counting region
the delimited form is not recognised, so the two quotes on the opening line pair off as an ordinary string and the block opener under them, outside it, opens a comment. Without the lone quote the file comes out right
scc --format json cases/2000-string_forms/2150-delimited_raw_string_names_its_own_closer/input.cpp
the delimited form is not recognised, so the two quotes on the opening line pair off as an ordinary string and the block opener under them, outside it, opens a comment. Without the lone quote the file comes out right
tokei --output json cases/2000-string_forms/2150-delimited_raw_string_names_its_own_closer/input.cpp