@CompSciDev String literals are _not_ const in C++ when -Wno-write-strings is enabled. That's what it does.
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 I think the problem is no-write-strings is implemented as a conversion option rather than as an actual "literals aren't const".
- Show replies
New conversation -
-
-
@CompSciDev Sorry, 140 characters. That is correct what you are saying. The problem is the ternary operator "unliterals" them.
-
@CompSciDev So now the warning is back, even though you asked not to have it. Does that make sense?
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.