Skip to content

C++17 auto in function template triggers false-positive error #2478

@taylorgordon20

Description

@taylorgordon20
struct Foo {
  template <auto x>
  void foo() {}
};

void bar() {
}

Foo f;
f.foo<bar>();

Results in "f" being underlined with an error squiggle and the message:

no instance of function template "Foo::foo" matches the argument list -- object type is: Foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicefixedCheck the Milestone for the release in which the fix is or will be available.parser

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions