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

bugfix: Use SFINAE to add overloads that handle std::vector/std::array of bool #446

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mendes-jose
Copy link

@mendes-jose mendes-jose commented Feb 26, 2025

Description

This PR aims to solve the compilation error we get when messages have at least one field of type bool[].

This has been discussed in other places, like in these issues here: #445, #393, #391

Also, there has been a PR which proposes a different solution to the same problem: #411

However, I think the solution adopted in this PR here (#446) is superior:

  • it's a pure C++ solution (it does not touch the EmPy stuff)
  • it avoids creating new methods with similar names (instead it adds overloads for specific cases using enable_if_t)

Tests

The following video shows the bi-directional bridge of messages using vectors of bools based on my version of ros1_bridge:

fix-bool-vec.mp4

Signed-off-by: José Mendes <mendesfilho@protonmail.com>
@mendes-jose mendes-jose changed the title Use SFINAE to add overloads that handle std::vector/std::array of bool bugfix: Use SFINAE to add overloads that handle std::vector/std::array of bool Feb 26, 2025
… ambiguity

Signed-off-by: José Mendes <mendesfilho@protonmail.com>
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.

1 participant