Avoid generating an accidental UDL suffix

In the error case, we previously output a pragma with a string immediately
followed by __FILE__ - but with no space between the string terminator and
__FILE__, a compliant C++ compiler can interpret this as a user-defined literal
suffix and end up failing to embed the intended information. We should add
spaces here to ensure our generated code is standards-compliant.
This commit is contained in:
Eric Astor
2023-04-12 19:54:31 +00:00
committed by Marshall Greenblatt
parent 5d48f277f2
commit 55e158fe81
4 changed files with 5 additions and 5 deletions

View File

@ -71,7 +71,7 @@ def make_cpptoc_function_impl_new(cls, name, func, defined_names, base_scoped):
result += '\n // BEGIN DELETE BEFORE MODIFYING'
result += '\n // AUTO-GENERATED CONTENT'
result += '\n // COULD NOT IMPLEMENT DUE TO: ' + ', '.join(invalid)
result += '\n #pragma message("Warning: "__FILE__": ' + name + ' is not implemented")'
result += '\n #pragma message("Warning: " __FILE__ ": ' + name + ' is not implemented")'
result += '\n // END DELETE BEFORE MODIFYING'
result += '\n}\n\n'
return result