Skip to content

Commit

Permalink
Avoid bad_node_size exception when cross building (#2232)
Browse files Browse the repository at this point in the history
* Refs 12581. Avoid bad_node_size exception

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>

* Refs 12583. Uncrustify.

Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
(cherry picked from commit 1484609)

Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
mergify[bot] and MiguelCompany authored Sep 27, 2021
1 parent 7ef4e90 commit 8752183
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
template<typename T>
struct my_tree_node_type
{
// There is an enum rb_tree_colo {false, true} here on libstdc++, it has been included below on other_info
// There is an enum tree_color {false, true} here on libstdc++, we should include it here to
// ensure there are no alignment issues
enum color_t
{
RED = false,
BLACK = true
}
color;

// Three pointers on MSVC and libstdc++, two on libc++
my_tree_node_type* parent;
Expand All @@ -44,4 +51,4 @@ struct tree_node_size : std::integral_constant<size_t, sizeof(my_tree_node_type<
{
};

#endif /* SRC_CPP_UTILS_COLLECTIONS_IMPL_CUSTOM_TREE_NODE_SIZE_IMPL_HPP_ */
#endif /* SRC_CPP_UTILS_COLLECTIONS_IMPL_CUSTOM_TREE_NODE_SIZE_IMPL_HPP_ */

0 comments on commit 8752183

Please sign in to comment.