Skip to content

Outline view flattens symbols inside operator"" (user-defined literal) function #14150

@sean-mcmanus

Description

@sean-mcmanus

Discussed in #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?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions