Opened 6 years ago
#12602 new Bugs
C++11 raw string literals with embedded escapes are mislexed
Reported by: | Owned by: | Hartmut Kaiser | |
---|---|---|---|
Milestone: | To Be Determined | Component: | wave |
Version: | Boost 1.63.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Raw string literals are partly intended to make it easier to write strings that would otherwise require extensive escaping - e.g., regular expressions. Unfortunately Wave seems to get confused when backslashes appear in C++11 raw string literals. For example:
R"(A\+)"
is parsed by compilers as a string of three characters: A, backslash, and +. Wave lexes this as an unterminated raw string literal followed by six individual character tokens. By contrast:
R"(A+)"
is correctly parsed as a two-character raw string literal.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
A minimal example of the problem