From 1484609fb2ea5c0d67d490f0c4444bd736a83648 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 27 Sep 2021 08:26:04 +0200 Subject: [PATCH] Avoid bad_node_size exception when cross building (#2229) * Refs 12581. Avoid bad_node_size exception Signed-off-by: Miguel Company * Refs 12583. Uncrustify. Signed-off-by: Miguel Company --- .../impl/node-sizes/custom/tree_node_size_impl.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cpp/utils/collections/impl/node-sizes/custom/tree_node_size_impl.hpp b/src/cpp/utils/collections/impl/node-sizes/custom/tree_node_size_impl.hpp index c7231955b47..30004cc11cf 100644 --- a/src/cpp/utils/collections/impl/node-sizes/custom/tree_node_size_impl.hpp +++ b/src/cpp/utils/collections/impl/node-sizes/custom/tree_node_size_impl.hpp @@ -23,7 +23,14 @@ template 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; @@ -44,4 +51,4 @@ struct tree_node_size : std::integral_constant