Skip to content

Conversation

ihb2032
Copy link

@ihb2032 ihb2032 commented Sep 10, 2025

This pull request addresses a build failure in folly/container/test/ForeachTest.cpp when compiling with GCC 14. The error is due to the use of the compiler builtin __type_pack_element in function signatures, which is no longer permitted.
The fix replaces the problematic use of type_pack_element_t with the standard library equivalent, std::tuple_element_t. This change ensures that the test suite remains compatible with the latest compiler versions without altering the logic of the tests.

…port GCC 14

The use of the `__type_pack_element` compiler builtin directly in function signatures in `folly/container/test/ForeachTest.cpp` causes a build failure with GCC 14. This is because the builtin is not intended for use in contexts that affect name mangling.

This commit resolves the issue by replacing the direct usage of `__type_pack_element_t` with `std::tuple_element_t`. This is a standards-compliant library trait that provides the same functionality and is safe to use in function signatures.

This change ensures that `ForeachTest` continues to compile successfully with newer versions of GCC, maintaining compiler compatibility.

Signed-off-by: lyd1992 <[email protected]>

Signed-off-by: ihb2032 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant