2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-19 04:22:13 +00:00

Use an R-string instead of using so many backslashes in the quoted string

examples.

Fixes #239.
This commit is contained in:
Zach Laine
2025-07-12 16:08:53 -05:00
parent ed9a06123b
commit 0b93a586f1

View File

@@ -323,8 +323,7 @@ int main()
assert(result1);
std::cout << *result1 << "\n"; // Prints: some text
auto result2 =
bp::parse("\"some \\\"text\\\"\"", bp::quoted_string, bp::ws);
auto result2 = bp::parse(R"("some \"text\"")", bp::quoted_string, bp::ws);
assert(result2);
std::cout << *result2 << "\n"; // Prints: some "text"
//]