Skip to content
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

Clang fails due to cbegin() returning an iterator, not a pointer, when casting to std::string_view #259

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

beku-epitome
Copy link
Contributor

cbegin() returns an iterator, which isn't exactly a pointer, causing clang to fail compilation on these lines. Use data() method instead.

cbegin() returns an iterator, which isn't exactly a pointer, causing clang
to fail compilation on these lines. Use data() method instead.
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link

github-actions bot commented Nov 8, 2023

Memory usage change @ 580649b

Board flash % RAM for global variables %
arduino:renesas_portenta:portenta_c33 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:renesas_uno:minima 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
rp2040:rp2040:arduino_nano_connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
rp2040:rp2040:rpipico 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/CAN/OpenCyphal-Blink
flash
% examples/CAN/OpenCyphal-Blink
RAM for global variables
% examples/CAN/OpenCyphal-Heartbeat-Publisher
flash
% examples/CAN/OpenCyphal-Heartbeat-Publisher
RAM for global variables
% examples/CAN/OpenCyphal-Heartbeat-Subscriber
flash
% examples/CAN/OpenCyphal-Heartbeat-Subscriber
RAM for global variables
% examples/CAN/OpenCyphal-Service-Client
flash
% examples/CAN/OpenCyphal-Service-Client
RAM for global variables
% examples/CAN/OpenCyphal-Service-Server
flash
% examples/CAN/OpenCyphal-Service-Server
RAM for global variables
%
arduino:renesas_portenta:portenta_c33 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:renesas_uno:minima 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
rp2040:rp2040:arduino_nano_connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
rp2040:rp2040:rpipico 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/CAN/OpenCyphal-Blink<br>flash,%,examples/CAN/OpenCyphal-Blink<br>RAM for global variables,%,examples/CAN/OpenCyphal-Heartbeat-Publisher<br>flash,%,examples/CAN/OpenCyphal-Heartbeat-Publisher<br>RAM for global variables,%,examples/CAN/OpenCyphal-Heartbeat-Subscriber<br>flash,%,examples/CAN/OpenCyphal-Heartbeat-Subscriber<br>RAM for global variables,%,examples/CAN/OpenCyphal-Service-Client<br>flash,%,examples/CAN/OpenCyphal-Service-Client<br>RAM for global variables,%,examples/CAN/OpenCyphal-Service-Server<br>flash,%,examples/CAN/OpenCyphal-Service-Server<br>RAM for global variables,%
arduino:renesas_portenta:portenta_c33,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:renesas_uno:minima,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
rp2040:rp2040:arduino_nano_connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
rp2040:rp2040:rpipico,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@aentinger aentinger changed the title fix clang compilation Clang fails due to cbegin() returning an iterator, not a pointer, when casting to std::string_view Nov 8, 2023
Copy link
Member

@aentinger aentinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you 🙇

@aentinger aentinger merged commit cdf3dc9 into 107-systems:main Nov 8, 2023
12 checks passed
@beku-epitome beku-epitome deleted the bugfix/clang-compile branch November 8, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants