-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
Build warnings in message_packet.h in IAR (version 8.42.2) #586
Comments
Can you try changing the function signature at line 666 (and the other equivalent lines, 948, 1228 etc) to read |
A function signature like
can be a bit confusing as it is not an |
IAR was tripping up on the syntax, generating warnings. This addresses that per the discussion in ETLCPP#586.
John, that change does indeed resolve the issue. Thanks for the reference on universal references (and other similar concepts). I started to read, but quickly realized it's a heavy topic... perhaps this Labor Day weekend while at the campground campfire. |
I was away for August bank holiday at the caving club HQ last weekend in the Brecon Beacons, in Wales. I tried not to think about programming and just enjoy the scenery. (Didn't always work though, but the laptop stayed at home) |
IAR was tripping up on the syntax, generating warnings. This addresses that per the discussion in #586. Co-authored-by: Jeremy Erdmann <jeremy.erdmann@millerwelds.com>
Fixed 20.34.0 |
The change de5a90a committed on 12/21/21 introduced compiler warnings for me when using the message_packet. My environment is IAR (version 8.42.2).
My etl_profile.h contains the following:
The following warnings are generated with the latest rev of the message_packet.h file from my application in IAR: cd18cc6 on July 27th, 2022:
I have found a few ways to get the warnings to go away, but it's not clear to me which if any might be most correct.
Option 1: define
ETL_MESSAGE_PACKET_FORCE_CPP03_IMPLEMENTATION
Option 2: on the lines immediately following the lines in question, change from
explicit message_packet(etl::imessage&& msg)
toexplicit message_packet(const TMessage& msg)
orexplicit message_packet(const TMessage& /*msg*/)
This is a bit complicated/beyond my expertise, so I'm looking for advice on how best to proceed. Option 1 seems the least intrusive, but feels like the wrong answer for the etl project if this is something others are likely to encounter as well. I'd make the change in a branch and figure out how to put up a PR if Option 2 or some other similar change seems like the correct path. I have compiled that locally in VS2019 and the unit tests appear to be passing in that environment.
Thanks in advance for advice on how to proceed.
-Jeremy
The text was updated successfully, but these errors were encountered: