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

[libc++][modules] Include __type_traits/invoke.h from __type_traits/result_of.h #106796

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Aug 30, 2024

The result_of trait requires the __invoke_of implementation detail, but that is defined under __type_traits, not under __functional. Include the right header directly to remove a dependency from __type_traits to __functional.

@ldionne ldionne requested a review from a team as a code owner August 30, 2024 20:58
@ldionne ldionne changed the title [libc++] Include __type_traits/invoke.h from __type_traits/result_of.h [libc++][modules] Include __type_traits/invoke.h from __type_traits/result_of.h Aug 30, 2024
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Aug 30, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 30, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

The result_of trait requires the __invoke_of implementation detail, but that is defined under __type_traits, not under __functional. Include the right header directly to remove a dependency from __type_traits to __functional.


Full diff: https://github.com/llvm/llvm-project/pull/106796.diff

1 Files Affected:

  • (modified) libcxx/include/__type_traits/result_of.h (+1-1)
diff --git a/libcxx/include/__type_traits/result_of.h b/libcxx/include/__type_traits/result_of.h
index f00fa8e9be7f73..73a19447520663 100644
--- a/libcxx/include/__type_traits/result_of.h
+++ b/libcxx/include/__type_traits/result_of.h
@@ -10,7 +10,7 @@
 #define _LIBCPP___TYPE_TRAITS_RESULT_OF_H
 
 #include <__config>
-#include <__functional/invoke.h>
+#include <__type_traits/invoke.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header

The result_of trait requires the __invoke_of implementation detail,
but that is defined under __type_traits, not under __functional.
Include the right header directly to remove a dependency from
__type_traits to __functional.
@ldionne ldionne force-pushed the review/modularization-result-of-invoke branch from b83a660 to 46561c2 Compare September 3, 2024 17:24
@ldionne ldionne merged commit ba40737 into llvm:main Sep 4, 2024
64 checks passed
@ldionne ldionne deleted the review/modularization-result-of-invoke branch September 4, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants