-
Notifications
You must be signed in to change notification settings - Fork 176
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
feat: ProxyAccessor constructor can now be constexpr #3757
Conversation
Makes sense. There's one unit test failure on macOS related to an unused variable. |
So the warning is here:
Indeed, that variable is not used, because it is just used to check that you can't modify through a That aside, do you have any ideas on how to fix this? |
@timadye maybe diff --git a/Tests/UnitTests/Core/EventData/TrackContainerComplianceTests.cpp b/Tests/UnitTests/Core/EventData/TrackContainerComplianceTests.cpp
index 636b30bff5..731f9e01a4 100644
--- a/Tests/UnitTests/Core/EventData/TrackContainerComplianceTests.cpp
+++ b/Tests/UnitTests/Core/EventData/TrackContainerComplianceTests.cpp
@@ -75,6 +75,7 @@ ACTS_DOES_NOT_COMPILE_SUITE_BEGIN(BuildFromConstRef)
(void)t;
ConstProxyAccessor<unsigned int> caccNMeasuements("nMeasurements");
+ static_cast<void>(caccNMeasuements); // suppressed unused warning
ACTS_DOES_NOT_COMPILE_BEGIN(ConstAccessorMutate)
caccNMeasuements(t) = 66;
ACTS_DOES_NOT_COMPILE_END() |
The macos build failure looks like an unrelated configuration problem (XercesC 3.2.5 instead of 3.3.0). Hopefully this can be fixed soon and we can see if the last update fixes the warning. |
In principle there should be a fix for this already. Maybe it's not merged yet |
@AJPfleger I think this is waiting for your approval, if you do approve. Thanks! |
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Since C++20 supports `constexpr std::string`, we can make `ProxyAccessorBase(const std::string& _key)` constructor `constexpr`.
Since C++20 supports `constexpr std::string`, we can make `ProxyAccessorBase(const std::string& _key)` constructor `constexpr`.
Since C++20 supports
constexpr std::string
, we can makeProxyAccessorBase(const std::string& _key)
constructorconstexpr
.