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

Avoid bad_node_size exception when cross building [12583] #2229

Merged
merged 2 commits into from
Sep 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_ */