Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove guards as we already require C++11#213

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aentinger merged 1 commit intoarduino:masterfromjboynes:clang_tidy
Sep 13, 2023

Conversation

jboynes
Copy link
Contributor

There are some legacy guards around the availability of C++11 features. However, we already require that versionin this file as well as others so they can be removed.

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base(66aa7db) 95.52% compared to head(c9346ee) 95.52%.

Additional details and impacted files
@@           Coverage Diff           @@##           master     #213   +/-   ##=======================================  Coverage   95.52%   95.52%           =======================================  Files          16       16             Lines        1072     1072           =======================================  Hits         1024     1024             Misses         48       48
Files ChangedCoverage Δ
api/String.cpp97.27% <ø> (ø)
api/String.h90.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

@aentinger
Copy link
Contributor

Can you be more specific? The requirements of the test code is not relevant here, what's relevant is that all cores using ArduinoCore-API support C++11 in order to remove those guards.

@jboynes
Copy link
ContributorAuthor

I thought that was a requirement for using this API package.

There are several places in the production code that already use C++11 featuresunguarded e.g.line 72 in this file that uses a delegatng constructor, asdoes CanMsg.h. Other features used areauto and "commas in enum" in Common.h, "long long" in Print.h. Possibly more, the compiler gave up at that point.

Given the guards were only in String code and that not all use of C++11 features was being guarded I thought they were old dead code that could be cleaned up.

@aentinger
Copy link
Contributor

That's true. But we do now know how many or which cores (that use ArduinoCore-API) are out there that do not support advanced language features. If anything, those advanced C++ usage should be hidden behind the same kind of include guards.

@jboynes
Copy link
ContributorAuthor

We do know that all corescurrently using ArduinoCore-API support C++11 because its features are already used, unguarded, in several places in the API code. That includes the arduinomegaavr andsamd cores.

Are there corestrying to adopt ArduinoCore-API that can't provide C++11 support?

The one that jumps to mind might be the arduinoAVR core but my understanding is that'salready using-std=gnu++11 so that wouldn't be an issue.

@aentinger
Copy link
Contributor

The issue is more about 3rd party cores, but a quick sampling of popular cores shows that Arduino_Core_STM32 usesC++17), arduino-esp32 usesC++17 and yes, even ArduinoCore-avr uses [C++11]. I therefore consider it safe to merge this issue, if a 3rd party corethat already uses ArduinoCore-API want to upgrade to the next released version they may as well consider updating their tooling. Furthermore, as you've said it, the CAN API and other code sequences in ArduinoCore-APIalready require a minimum of C++11.

@aentingeraentinger merged commit6cd8d8a intoarduino:masterSep 13, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@jboynes@codecov-commenter@aentinger@per1234

[8]ページ先頭

©2009-2025 Movatter.jp