francois barjon writes:Semantic's template handling is pretty basic. It cannot deal with
> thanks for your answer. I imagine that handling C++ template expansion must be
> a tricky stuff! I am interested if there are enhancements on the subject.
> I have continued my tests on semantic completion for smart pointers. The
> completion works with boost shared_ptr but not with STL shared_ptr. Here are
> two code samples explaining why completion does not work in STL case.
template default arguments and template specializations, which is why
many things especially from the STL are not parsed correctly (most
prominently the vector class). Also, at least the GNU STL makes
extensive use of typedef trickeries, which currently confuses Semantic a
I did extend the C++ grammar and the template/typedef parsing code a few
years ago to correctly parse <vector> from the GNU STL, but I never came
to merge it, because the Emacs merge was more important at that time,
and also because I was simply fed up with that template stuff. After
weeks of fiddling, I came to the conclusion that we should try to
delegate this nasty C++ parsing business to compilers like clang or gcc,
but that hasn't happened; anything we do with clang cannot get merged to
Emacs, and gcc lacks tooling support in the first place.
Since I'm doing a lot of C++ coding again, there's a good chance I dig
out that branch, though I'm afraid it has bit-rotted quite a bit.