Project

General

Profile

Cleanup #3977

Do a great stream operator const cleanup!

Added by Greg Farnum over 4 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
01/31/2013
Due date:
% Done:

0%

Spent time:
Tags:
Backport:
Reviewed:
Affected Versions:
Release:
Needs Doc:
No

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 3 months 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 3 months 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 about 2 months ago

  • Assignee set to Jos Collin

#4 Updated by Jos Collin about 2 months ago

  • Status changed from New to Need 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 about 2 months ago

  • Status changed from Need Review to In Progress

#6 Updated by Jos Collin about 2 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF