Signature Help
Overload Signatures
A call lists every overload it may reach, with the parameter under the cursor marked.
Overloads by arity
Every overload is listed with the parameter under the cursor marked
Active parameter
The parameter the argument under the cursor binds to is marked in the label
Const overloads
Of a const and a non-const overload taking the same parameters, only the one the object calls shows
A non-const object calls the non-const overload; a const object can call only the const one, whose label ends in const.
Picked overload
The overload the user moved the popup to stays shown while typing in the call
Asked again while the call is being typed, signature help keeps the overload the editor shows active as long as it is still listed, instead of jumping back to the one that fits the arguments best.
Call Contexts
Signature help follows the call around the cursor, whatever is being called: a constructor, a function pointer, an object with operator(), a template.
Constructors and aggregates
A constructor call lists the constructors without a return type, and braced aggregate initialization lists the fields
Written with braces, the constructors show with braces too.
Function pointer calls
A call through a function pointer shows the parameter names its type spells
Template argument lists
Template parameters show as the signature, a class template ending in its kind instead of a return type
Nested calls
Inside a nested call the help follows the innermost call around the cursor
Functor calls
Calling an object shows its operator() overloads under the object's name
An object the call does not name, such as one a function returns, shows operator() with its qualifiers.
Lambda calls
Calling a lambda shows its parameters under the name of the variable holding it
A lambda called where it is written has no name, so its parameters stand alone.
New expression
A new-expression's constructor arguments drive signature help
Written with parentheses, it lists the constructors; written with braces, it shows nothing.
Subscript operators
An overloaded operator[] shows no signature help
Inherited constructors
Constructors a class inherits are missing from its constructor list
Only the implicit copy and move constructors show, not the Base(int, int) that using Base::Base brings in and the call actually uses.
Function-like macros
A function-like macro's arguments show the macro's parameters, not those of what it expands to
A function called inside one of the arguments shows its own signature.
Class template members
A member of a class template shows the types the object's class is instantiated with
Vector<Point>::at returns Point &, not T &, and a call through a function object shows the parameters of the function type it was declared with. A member template's own parameters stay as it declares them. A standard library type shows under its usual name: string, not basic_string<char>.
Dependent member calls
Inside a template, a call through an object of dependent type shows the overloads its class template declares
Past the first argument only the overloads taking another one stay. Clang has no signature for such a call until the template is instantiated.
Parameter Display
Each parameter shows as the call takes it, its default value as the source writes it.
Default arguments
Parameters with defaults show their default value as the source writes it
A macro stays a macro and an octal number stays octal; a default written over several lines shows on one.
C-style variadic functions
A C-style ... shows as the last parameter, marked for every argument past the named ones
Parameter packs
A parameter pack shows as the template declares it, marked for every argument it takes
Explicit object parameters
A C++23 this parameter stays out of the label: the object a member is called on is no argument
Forwarding functions
A call that forwards its arguments to a constructor shows the constructor's parameters
A function template whose definition builds a class from its trailing pack — new T(args...), T(args...), T{args...}, a variable built so, or std::make_unique<T>(args...) — shows the constructors of the class it builds, each after the function's own parameters before the pack. A member of that class reaches its private constructors too. A pack built into a type made of the arguments' own types shows as written.
Standard forwarding functions
make_unique, make_shared and the containers' emplace functions show the constructors of what they build
The constructors that can take the arguments written so far are listed, the best match first, each with its parameters after the function's own ones, such as the key of a map's try_emplace. An aggregate lists its fields.
Members through a dependent specialization
A member of a class template called through a dependent specialization of it shows the arguments the code names it with
pts.assign( over a lib::vector<Point<T>> takes a const Point<T> &, not the template's own const _Tp &.
Documentation
The called function's documentation comment shows with its signatures, as plain text, read as hover reads it; each parameter carries its @param text, which editors show for the parameter being written.
Documentation comments
The called function's documentation comment shows with its signature, and the @param text of the parameter being written with that parameter
With documentation = false in the [signature_help] section the popup shows the signatures alone.
Trigger Characters
Registered: (, ), {, }, <, >, ,
| Character | Context | Behavior |
|---|---|---|
( | Function call | Show overload signatures |
) | Close paren | Update context |
{ | Brace init | Show overload signatures |
} | Close brace | Update context |
< | Template args | Show overload signatures |
> | Template close | Update context |
, | Argument separator | Update active parameter |
