Closed AbrilRBS closed 2 years ago
I wonder if we should actually escape the char*
interface, I don't know how optimized the escaping will be while the work doesn't actually needs to be done.
I wonder if we should actually escape the
char*
interface, I don't know how optimized the escaping will be while the work doesn't actually needs to be done.
Seems not at all, the std::string is always created https://godbolt.org/z/6Yn6nxhMv
can't make it constexpr
because of the allocation, but we can make it static
, and then it's mostly a no-op https://godbolt.org/z/zxs9YbY9s
OH oops, maybe not, it does something else in when using the actual workflow/cmake buildsettings https://godbolt.org/z/5qafKP4qb
Let's just remove the escaping for const char *
, would have to resort to template shenanigans to make a compile-time checkable thing.
JSON keys need to also be escaped.
Fixes compiler-explorer/compiler-explorer/issues/3963