-
Notifications
You must be signed in to change notification settings - Fork 425
Directives: remove parens to silence gcc8 warning #844
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
Conversation
Can you also PR this to branch 0.13-release? |
Absolutely, will PR now. |
@@ -34,7 +34,7 @@ | |||
#define BOOST_NETWORK_STRING_DIRECTIVE(name, value, body, pod_body) \ | |||
template <class ValueType> \ | |||
struct name##_directive { \ | |||
ValueType const&((value)); \ | |||
ValueType const& value; \ |
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.
Thanks for this change. I think, though, a better way to go about this might be to use a different name for the member variable, and use the token concatenation to do this properly. Say, something like:
ValueType const& value##_;
explicit name##_directive(ValueType const& v) : value##_(v) {}
Then also change all the occurences of just value
to use the member variable value##_
instead?
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.
Thanks for this change. I think, though, a better way to go about this might be to use a different name for the member variable, and use the token concatenation to do this properly.
You're welcome. I can make the changes to the member variable using token concatenation. I'm not very familiar with macro black magic, so wanted to make the most conservative changes possible.
Just so I understand you correctly, the changes would be:
... : value##_(value_) {}
... : value##_(other.value) {}
in addition to your example above? Or would other.value
also need to become other.value##_
?
On Thu, 31 May 2018 at 3:10 am, oneiric ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In boost/network/message/directives/detail/string_directive.hpp
<#844 (comment)>:
> @@ -34,7 +34,7 @@
#define BOOST_NETWORK_STRING_DIRECTIVE(name, value, body, pod_body) \
template <class ValueType> \
struct name##_directive { \
- ValueType const&((value)); \
+ ValueType const& value; \
Thanks for this change. I think, though, a better way to go about this
might be to use a different name for the member variable, and use the token
concatenation to do this properly.
You're welcome. I can make the changes to the member variable using token
concatenation. I'm not very familiar with macro black magic, so wanted to
make the most conservative changes possible.
Just so I understand you correctly, the changes would be:
... : value##_(value_) {}
... : value##_(other.value) {}
in addition to your example above? Or would other.value also need to
become other.value##_?
No worries, this is not easy stuff. 😊
I suggest changing the name of the function argument to something visually
different from `value` like `v` then change the member name to have a
suffix. So yes, `other.value` becomes `other.value##_`.
—
… You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#844 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADr6S_zlDGfbn13j3jJ0e3piMXMlPZpks5t3tJ1gaJpZM4UR-eX>
.
|
70fdea7
to
1848435
Compare
I've made the changes to get a working build in the I would like to add the same changes to this PR, but there appears to be a missing commit for the
Rebasing on the current master did not work either, as it also fails to build:
Several errors like the one above are issued. Please advise, and thank you for your time. |
I've just merged a couple of PRs that were meant to address this. You're probably going to have to update the submodules after your rebase: Does that work? |
I've updated my submodules before and after your post, no change. Master does not build with the error messages posted above. While we are working on this issue, would you please merge the change for the |
Okay, I thought #847 did that for the master branch but it actually did it for the 0.13-release branch -- my bad. Yes, I'll cherry-pick that and attempt to push. |
Alright, please rebase past 604d611 on master. Let me know if that works. |
Unfortunately, still broken... Same errors. |
Try: # after rebasing your branch onto master
git submodule update --remote
git submodule update You should see that the submodule definitions have been updated. |
I understand that you updated the submodules. However, the master build is still borked:
This occurs with both versions of the submodules. |
1848435
to
cdf7613
Compare
LGTM That's now an issue with the URI library, probably want to either get @glynos to update the implementation of Boost things in there or consider turning off that warning in the URI builds. I'm happy to merge now. |
Thank you @deanberris. Hopefully, @glynos will be able to help with the URI issue. |
Fixes
-Wparentheses
warning from gcc8 builds.Example build output: