Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include: xlist: Fix Clang error for missing string #19367

Merged
merged 1 commit into from Dec 13, 2017

Conversation

wjwithagen
Copy link
Contributor

@wjwithagen wjwithagen commented Dec 7, 2017

Clang complains:

home/jenkins/workspace/ceph-master/src/include/xlist.h:210:13: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const char *')
        oss << ", ";
        ~~~ ^  ~~~~
1 error generated.

So make sure that a string is a string.

Signed-off-by: Willem Jan Withagen wjw@digiware.nl

@@ -207,7 +208,7 @@ class xlist {
bool first = true;
for (const auto &item : list) {
if (!first) {
oss << ", ";
oss << std::string(", ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the right fix is to #include <ostream> in this header file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tchaikov
Will try, thanx.

Clang complains:
home/jenkins/workspace/ceph-master/src/include/xlist.h:210:13: error: invalid operands to binary exp
ression ('std::ostream' (aka 'basic_ostream<char>') and 'const char *')
        oss << ", ";
        ~~~ ^  ~~~~
1 error generated.

include ostream to fix Clang error

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@wjwithagen
Copy link
Contributor Author

@tchaikov
Correct, Ping!

@tchaikov tchaikov merged commit 07564ff into ceph:master Dec 13, 2017
@wjwithagen wjwithagen deleted the wip-wjw-clang-xlist-string branch February 11, 2018 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants