-
Notifications
You must be signed in to change notification settings - Fork 5.5k
header_map: copy constructor for HeaderMapImpl. #4129
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
Changes from 1 commit
01f7423
fffdbbc
b0aa98a
e5ce010
76dfa6c
080a830
f88da73
86cc2fa
d7d65ad
3c525eb
aa008ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,6 +292,9 @@ HeaderMapImpl::HeaderMapImpl(const HeaderMap& rhs) : HeaderMapImpl() { | |
| this); | ||
| } | ||
|
|
||
| HeaderMapImpl::HeaderMapImpl(const HeaderMapImpl& rhs) | ||
| : HeaderMapImpl(static_cast<const HeaderMap&>(rhs)) {} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I'm confused. How is this different from what the compiler did before?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was synthesizing the default copy constructor, since we only supplied a constructor for the class we were deriving from AFAICT.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's something more going on here though, witness the build failures. Looking into this now. |
||
|
|
||
| HeaderMapImpl::HeaderMapImpl( | ||
| const std::initializer_list<std::pair<LowerCaseString, std::string>>& values) | ||
| : HeaderMapImpl() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change still needed? It's unclear to me why the compiler won't just pick the other one.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so; the implicit copy constructor is deleted, the above constructor for
HeaderMapisn't actually a copy constructor.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. OK.