Currently clangd will display useless inlay hint for dependent type in
structured binding, e.g.
template <class T> void foobar(T arg) { auto [a/*: <dependent type>*/, b/*: <dependent type>*/] = arg; }
Differential D157956
[clangd] don't add inlay hint for dependent type in structured binding v1nh1shungry on Aug 15 2023, 2:23 AM. Authored by
Details Currently clangd will display useless inlay hint for dependent type in template <class T> void foobar(T arg) { auto [a/*: <dependent type>*/, b/*: <dependent type>*/] = arg; }
Diff Detail
Event TimelineComment Actions Thanks! A future enhancement to consider could be, in the following testcase: template <typename T, typename U> struct Pair { T t; U u; }; template <class T, class U> void foobar(Pair<T, U> arg) { auto [a, b] = arg; } to get the hints to be T and U. (Today they are <dependent type>, so the patch is still an improvement in this case.) |