Skip to content

Type inference - auto as function parameters #180

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

Closed
pramoddevendra opened this issue Apr 6, 2021 · 0 comments
Closed

Type inference - auto as function parameters #180

pramoddevendra opened this issue Apr 6, 2021 · 0 comments

Comments

@pramoddevendra
Copy link

Chapter 2.3 Type inference:
Note: auto cannot be used for function arguments, so the following is not possible to compile
(considering overloading, we should use templates):
int add(auto x, auto y);

C++20 includes this support.

@pramoddevendra pramoddevendra changed the title Type inference - auto as functional parameters Type inference - auto as function parameters Apr 6, 2021
@changkun changkun reopened this Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants