Project

General

Profile

Cleanup #3977

Do a great stream operator const cleanup!

Added by Greg Farnum about 11 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
% Done:

0%

Spent time:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

I just spent a little while trying to figure out why the compiler couldn't resolve operator<< (the stream operator) on a function whose operator<< function was included in the list of candidates. The calling function was const and the stream operator didn't mark it that way, was why. A quick grep indicates that a number of such sins remain in the code base. Clean them up!

History

#1 Updated by Jos Collin almost 7 years ago

Greg,

Is this appears as an error during make ? Could you please show me an example of your Description ?

Thanks,
Jos Collin

#2 Updated by Greg Farnum almost 7 years ago

Woah, blast from the past! :)

The issue described here is that we had a bunch of operator<< functions with non-const inputs. That precludes using them inside of other const contexts, which isn't a problem with building the existing source but makes ongoing development a bit more annoying.

#3 Updated by Jos Collin almost 7 years ago

  • Assignee set to Jos Collin

#4 Updated by Jos Collin almost 7 years ago

  • Status changed from New to Fix Under Review

Fixed the instances inside src/ folder utmost. This fix avoids the following directories inside src: rocksdb/ zstd/ boost/ rapidjson/ googletest/ Beast/.

https://github.com/ceph/ceph/pull/15364

#5 Updated by Jos Collin almost 7 years ago

  • Status changed from Fix Under Review to In Progress

#6 Updated by Jos Collin almost 7 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF