Skip to content

Type inference - auto as function parameters #180

Closed
@pramoddevendra

Description

@pramoddevendra

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions