cxxheaderparser icon indicating copy to clipboard operation
cxxheaderparser copied to clipboard

[PARSE BUG]: fails to parse template cast operator

Open sampotter opened this issue 10 months ago • 1 comments

Problem description

Trying to parse a header with the attached definition in it fails with this exception:

CxxParseError: filtered.cpp:13282: parse error evaluating 'operator': unexpected 'operator', expected 'NAME'

C++ code that can't be parsed correctly (please double-check that https://robotpy.github.io/cxxheaderparser/ has the same error)

template <class T> ON_SimpleArray<T>::operator T *() {
  return (m_count > 0) ? m_a : 0;
}

sampotter avatar Apr 24 '25 16:04 sampotter

This morning I took a look since I thought it would be easy... but alas, it was more annoying than I expected.

virtuald avatar Apr 25 '25 18:04 virtuald