-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support compilation for x86 as a static library using CMake. #201
Conversation
…back with C++20. Since we basically stay compatible to C++11 I've disabled the pedantic warning for designated initalizers.
Hi @pavel-kirienko ☕ 👋 I've got some issue (invalid use of incomplete type) with my forward declarations. It works, but the compiler is not happy when I turn up -Wpedantic/-Werror: -Arduino-Cyphal/src/Publisher.ipp: In member function ‘bool impl::Publisher<T>::publish(const T&)’:
107-Arduino-Cyphal/src/Publisher.ipp:45:10: error: invalid use of incomplete type ‘class Node’ [-Werror]
45 | return _node_hdl.enqueue_transfer(_tx_timeout_usec,
| ^~~~~~~~~
107-Arduino-Cyphal/src/Publisher.hpp:21:7: note: forward declaration of ‘class Node’
21 | class Node;
| ^~~~ I'm not sure how to best solve this, as both Node and Publisher use the other class. Do you have any suggestion? |
You cannot invoke methods on an incomplete type, so |
Thank you for the pointer, I managed to break the circular dependency by extracting base classes into a separate header file (and inventing one, where none existed before). |
…eparate header file breaks the circular dependency.
…r (no need for #ifdef LIB... anymore).
…lib ... this leads to liblibname file which causes issues down the road.
This makes sense as it does not change over time.
…. This could probably be bundled in an external library all-together.
…c type unpacking, which would actually require C++17 but for some reason compiles on Arduino also below ++11.
Memory usage change @ 6ee8649
Click for full report table
Click for full report CSV
|
extras/cyphal++/examples/example-01-opencyphal-basic-node/README.md
Outdated
Show resolved
Hide resolved
Memory usage change @ 779617e
Click for full report table
Click for full report CSV
|
extras/cyphal++/examples/example-01-opencyphal-basic-node/README.md
Outdated
Show resolved
Hide resolved
…ME.md Do as Pavel says. Co-authored-by: Pavel Kirienko <pavel.kirienko@gmail.com>
This fixes #176.