From: William S F. <ws...@fu...> - 2017-03-10 23:59:46
|
Guillaume, Parsing errors are often fixed when reported, so there aren't many known parsing problems. Known problems are most likely to be found as open Github issues. I've committed a change to fix the parsing syntax error you mention below. In this case the problem was the const declaration of the member function pointer parameter and is independent of the exec function being a template. William On 19 February 2017 at 10:32, Guillaume Bittoun <gui...@gm... > wrote: > Thanks, it indeed solved my problem; > > I couldn’t find a list of known problems on C++ parsing in the > documentation but maybe I just looked bad, if there is any, I’d be pleased > to read it :-) > > Regards, > > Guillaume > > Le 17/02/2017 à 13:39, Jake a écrit : > > You can ignore it by wrapping the header declaration in: > > #ifndef SWIG > ... > #endif > > This will prevent SWIG from seeing it during parsing. The ignore directive > needs a successful parse so it can't be used when SWIG doesn't support part > of the language. > > -Jake Cobb > > On Fri, Feb 17, 2017, 06:11 Guillaume Bittoun <gui...@gm...> > wrote: > >> Hello, >> >> I am currently using SWIG 3.0.8, trying to wrap an object that has >> templated function pointer in argument of a function as >> class Object { >> … >> public: >> >> template<typename T> int exec (std::list<std::shared_ptr<T>>&, >> unsigned int (T::*)() const) const; >> … >> } >> >> On this specific function SWIG returns: >> Object.h:68: Error: Syntax error in input(3). >> >> I am now wondering if that kind of function syntax, ie. taking a >> templated function pointer as argument, is supported by SWIG. I can barely >> find some examples of this on the internet and I apologise if I missed this >> in the doc but is there any known issue about my problem ? Is there a >> workaround ? I can remove this function from the wrapping, but a `%ignore >> Object::exec` directive doesn’t avoid the previous SWIG error. >> >> Any clue is welcome :-) >> >> Regards, >> >> Guillaume >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot______ >> _________________________________________ >> Swig-user mailing list >> Swi...@li... >> https://lists.sourceforge.net/lists/listinfo/swig-user >> > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > > |