In the following example code I do not get any parameter hints for the operator, but if I manually type in true clangd recognizes that I am calling the operator.
Details
struct Abc {
static void operator()(bool a) {}
};
void test() {
Abc abc;
abc(^);
}
If I remove the static from the operator definition I do get the paramtere hints.
Details
struct Abc {
void operator()(bool a) {}
};
void test() {
Abc abc;
abc(^);
}
As straight forward as this bug seems to be, I stumbled upon some more odd behaviour. Consider now me using 2 parameters, this still does not work with static as you can see here.
Details
struct Abc {
static void operator()(bool a, bool b) {}
};
void test() {
Abc abc;
abc(^);
}
But if I now template my operator it does work.
Details
struct Abc {
template <typename T>
static void operator()(T a, bool b) {}
};
void test() {
Abc abc;
abc(^);
}
The odd part here is that I need 2 parameters for my operator, because the templated version with only 1 parameter does not work.
Details
struct Abc {
template <typename T>
static void operator()(T a) {}
};
void test() {
Abc abc;
abc(^);
}
Also it is important that the template type is used in the parameters, otherwise it does not work.
Details
struct Abc {
template <typename T>
static void operator()(bool a, bool b) { T c; }
};
void test() {
Abc abc;
abc(^);
}

In the following example code I do not get any parameter hints for the operator, but if I manually type in
trueclangd recognizes that I am calling the operator.Details
If I remove the
staticfrom the operator definition I do get the paramtere hints.Details
As straight forward as this bug seems to be, I stumbled upon some more odd behaviour. Consider now me using 2 parameters, this still does not work with static as you can see here.
Details
But if I now template my operator it does work.
Details
The odd part here is that I need 2 parameters for my operator, because the templated version with only 1 parameter does not work.
Details
Also it is important that the template type is used in the parameters, otherwise it does not work.
Details