eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.04k stars 730 forks source link

[21165] Correctly initialize `MatchingFailureMask` constants to be used with the `std::bitset` API (backport #4922) #4927

Closed mergify[bot] closed 2 weeks ago

mergify[bot] commented 4 weeks ago

Description

This PR changes the values of the MatchingFailureMask so they can be directly used through the std::bitset API. Before this PR, the following code:

EDP::MatchingFailureMask mask;
mask.set(EDP::MatchingFailureMask::different_typeinfo);

resulted in a C++ exception as follows:

"bitset::set: __position (which is 16) >= _Nb (which is 16)"

@Mergifyio backport 2.14.x 2.13.x 2.10.x 2.6.x

Contributor Checklist

Reviewer Checklist

mergify[bot] commented 4 weeks ago

Cherry-pick of 5e1f1dd22afb2dd50abfbeb0726a06907e01209c has failed:

On branch mergify/bp/2.10.x/pr-4922
Your branch is up to date with 'origin/2.10.x'.

You are currently cherry-picking commit 5e1f1dd22.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   include/fastdds/rtps/builtin/discovery/endpoint/EDP.h
    both modified:   test/unittest/rtps/discovery/EdpTests.cpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally