microsoft / microsoft/vscode-cpptools
Outline view flattens symbols inside `operator""` (user-defined literal) function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Discussed in https://github.com/microsoft/vscode-cpptools/discussions/14019
Originally posted by coshz October 26, 2025
I've noticed that VS Code outline view treats symbols inside user-defined literal function, instead of operator"" itself, as top-level symbols. Example code:
void operator""_T(const char* str, size_t n)
{
auto foo = [](auto s) { return s; };
std::string var_1 = std::string(str,n);
foo(var_1);
std::string var_2 = foo(var_1);
}
The outline view behavior (sort by position):
- observed: var_1, foo, var_2;
- expected: operator""_T(const char*, size_t).
Is this a known limitation of the symbol parser for user-defined literals?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal C++ user-defined literal example in the issue and inspect the outline symbol parsing path used by the VS Code extension. Done means the outline shows operator""_T as the function and nests var_1, foo, and var_2 instead of treating them as top-level symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100