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.06k stars 738 forks source link

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

Closed EduPonz closed 1 month ago

EduPonz commented 1 month 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

EduPonz commented 1 month ago

@richiprosima please test discovery-server

EduPonz commented 1 month ago

@richiprosima please test_3 discovery-server

EduPonz commented 1 month ago

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

mergify[bot] commented 1 month ago

backport 2.14.x 2.13.x 2.10.x 2.6.x

✅ Backports have been created

* [#4925 [21165] Correctly initialize `MatchingFailureMask` constants to be used with the `std::bitset` API (backport #4922)](https://github.com/eProsima/Fast-DDS/pull/4925) has been created for branch `2.14.x` but encountered conflicts * [#4926 [21165] Correctly initialize `MatchingFailureMask` constants to be used with the `std::bitset` API (backport #4922)](https://github.com/eProsima/Fast-DDS/pull/4926) has been created for branch `2.13.x` but encountered conflicts * [#4927 [21165] Correctly initialize `MatchingFailureMask` constants to be used with the `std::bitset` API (backport #4922)](https://github.com/eProsima/Fast-DDS/pull/4927) has been created for branch `2.10.x` but encountered conflicts * [#4928 [21165] Correctly initialize `MatchingFailureMask` constants to be used with the `std::bitset` API (backport #4922)](https://github.com/eProsima/Fast-DDS/pull/4928) has been created for branch `2.6.x` but encountered conflicts