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

core:" Stringify needs access to << before reference" src/include/stringify.h #16334

Merged
merged 1 commit into from Jul 15, 2017

Conversation

Projects
None yet
2 participants
@wjwithagen
Copy link
Contributor

wjwithagen commented Jul 14, 2017

Clang complains:

In file included from /home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:21:
/home/jenkins/workspace/ceph-master/src/include/stringify.h:15:6: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup
ss << a;
^
/home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:129:32: note: in instantiation of function template specialization 'stringify<std::__1::set<std::__1::basic_string, std::__1::less<std::__1::basic_string >, std::__1::allocator<std::__1::basic_string > > >' requested here
boost::regex("%names%"), stringify(names[p.first]));
^
/home/jenkins/workspace/ceph-master/src/include/types.h:160:17: note: 'operator<<' should be declared prior to the call site
inline ostream& operator<<(ostream& out, const set<A, Comp, Alloc>& iset) {

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

core:" Stringify needs access to << before reference" src/include/str…
…ingify.h

Clang complains:

In file included from /home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:21:
/home/jenkins/workspace/ceph-master/src/include/stringify.h:15:6: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup
  ss << a;
     ^
/home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:129:32: note: in instantiation of function template specialization 'stringify<std::__1::set<std::__1::basic_string<char>, std::__1::less<std::__1::basic_string<char> >, std::__1::allocator<std::__1::basic_string<char> > > >' requested here
      boost::regex("%names%"), stringify(names[p.first]));
                               ^
/home/jenkins/workspace/ceph-master/src/include/types.h:160:17: note: 'operator<<' should be declared prior to the call site
inline ostream& operator<<(ostream& out, const set<A, Comp, Alloc>& iset) {

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
@joscollin
Copy link
Member

joscollin left a comment

LGTM. @wjwithagen I hope you have tested the fix in FreeBSD.

@wjwithagen

This comment has been minimized.

Copy link
Contributor Author

wjwithagen commented Jul 14, 2017

@joscollin
My jenkins build crashed on this missing.
This as PR fixes it. So yes it is tested.

@joscollin

This comment has been minimized.

Copy link
Member

joscollin commented Jul 15, 2017

Tested the PR and it builds with no issues on my side with gcc (GCC) 7.1.1. The jenkins build here also shows no crash. So merging it.

@joscollin joscollin merged commit 9f68065 into ceph:master Jul 15, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@wjwithagen wjwithagen deleted the wjwithagen:wjw-bug-stringyfy branch Aug 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.