Hello,
I have recently started clangd and had immediate success. However my project has a dependency which makes good use of c++14 return type deduction for functions, which when used create errors that prevent me from using the “go to definition” feature in my IDE. Here is a minimal example containing two files:
– main.cpp –
#include “util.h”
template
auto fooa(T a) { return a; }
int main() {
fooa(0); // ok
foob(0); // ok
fooc(0); // error: function ‘fooc’ with deduced
// return type cannot be used before
// it is defined
return 0;
}
– util.h –
template
auto foob(T a) → decltype(a) { return a; }
template
auto fooc(T a) { return a; }