microsoft / microsoft/vscode-cpptools

Variable template parameter name pass

Open
#6,563 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Language Service verified Visual Studio
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Issue Type: Feature Request

template<class> class functor;

template<class ret, class ... args> 
class functor{
    ret operator()(args ... list){ // I hope the 'list' would replace by the user-defined name
        ...
    }
};

// specialization this template
functor<void(int id, int age)> x;

// when i call it, the vscode-externsion could hint the parameters name which i declared before
x();

Extension version: 1.1.2
VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-10T23:34:32.027Z)
OS version: Windows_NT x64 10.0.19041

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the supplied C++ example with the reported VS Code and extension versions to reproduce the missing parameter-name hint. Trace the extension's handling of template call signatures and determine where this behavior belongs. Done when the extension offers the user-defined names for the callable parameters in the shown scenario and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.