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

std::function does not have deduction guides #38954

Closed
ldionne opened this issue Nov 9, 2018 · 2 comments
Closed

std::function does not have deduction guides #38954

ldionne opened this issue Nov 9, 2018 · 2 comments
Assignees

Comments

@ldionne
Copy link
Contributor

@ldionne ldionne commented Nov 9, 2018

Bugzilla Link 39606
Resolution FIXED
Resolved on Mar 02, 2021 13:44
Version unspecified
OS All
CC @mclow
Fixed by commit(s) e1eabcd

Extended Description

We're missing deduction guides for std::function. The following code does not compile with libc++ trunk:


#include

int func(double) { return 0; }
int main() {
std::function f{func}; // guide #​1 deduces function<int(double)>
int i = 5;
std::function g = & { return i; }; // guide #​2 deduces function<int(double)>
}

Taken from SO question: https://stackoverflow.com/q/53217511/1708801

@ldionne
Copy link
Contributor Author

@ldionne ldionne commented Nov 9, 2018

assigned to @ldionne

@ldionne
Copy link
Contributor Author

@ldionne ldionne commented Mar 2, 2021

Fixed a while ago in:

commit e1eabcd
Author: Louis Dionne ldionne@apple.com
Date: Thu Jul 18 19:50:56 2019 +0000

[libc++] Add C++17 deduction guides for std::function

Summary: llvm/llvm-project#38954 

Reviewers: Quuxplusone

Subscribers: christof, dexonsmith, libcxx-commits

Differential Revision: https://reviews.llvm.org/D54410

llvm-svn: 366484

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant