I feel like there is a bug in clang's -Wno-write-strings: (var ? "foo" : "bar") evals to a _const_ string, rather than a non-const string.
@CompSciDev String literals are _not_ const in C++ when -Wno-write-strings is enabled. That's what it does.
-
-
@CompSciDev I think the problem is no-write-strings is implemented as a conversion option rather than as an actual "literals aren't const".
-
@CompSciDev This makes the ternary operator not work, since after passing through the ternary operator, the string "isn't literal" anymore.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.