Skip to content

Commit d07e8ce

Browse files
authored
Merge pull request #74619 from swiftlang/egorzhdan/std-function-inout
[cxx-interop] Instantiate the `std::function` constructor with a const pointer argument
2 parents c5abca2 + d38067c commit d07e8ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ClangDerivedConformances.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ void swift::conformToCxxFunctionIfNeeded(
10591059

10601060
auto funcPointerType = clangCtx.getPointerType(clangCtx.getFunctionType(
10611061
operatorCallDecl->getReturnType(), operatorCallParamTypes,
1062-
clang::FunctionProtoType::ExtProtoInfo()));
1062+
clang::FunctionProtoType::ExtProtoInfo())).withConst();
10631063

10641064
// Create a fake variable with a function type that matches the type of
10651065
// `operator()`.

0 commit comments

Comments
 (0)