Wrong analysis for operator+ with std::string and char
已回答
In the following program CLion gives a faulty analysis of the code:
#include <string>
int main() {
return (int)(std::string() + '\n').length();
}
CLion 2018.1.2 interprets '\n' as an int. Replacing '\n' with '\0' removes the warning.
请先登录再写评论。
Hello!
We have the issue about that in our tracker: https://youtrack.jetbrains.com/issue/CPP-11179. Feel free to comment or upvote, follow it to get updates.