Menu

#1062 Parse error on two parameter template template argument

None
closed-fixed
parsing (146)
5
2023-02-17
2010-01-13
vroom
No

Although SWIG seems to support a construct like:

template<
typename A, template< typename > class B
>
class foo
{
};

It produces a "Error: Syntax error in input(1)" when adding a second "typename" in the template template parameter:

template<
typename A, template< typename,typename > class B
>
class foo
{
};

Discussion

  • vroom

    vroom - 2010-01-13

    Forgot to mention: bug is with version 1.3.40

     
  • Chris Long

    Chris Long - 2012-01-20

    This also seems to exist in version 2.0.4. I also tried adding dummy type names but that didn't help. In the absence of a fix, does anyone have a suggestion for a workaround?

     
  • Olly Betts

    Olly Betts - 2022-03-16

    Reproduced with git master. Code seems valid ( g++ -std=c++98 is happy with it).

    I don't see a good workaround, though I haven't experimented.

     

    Last edit: Olly Betts 2022-03-16
  • William Fulton

    William Fulton - 2023-02-17
    • status: open --> closed-fixed
    • assigned_to: Marcelo Matus --> William Fulton
    • Group: -->
     
  • William Fulton

    William Fulton - 2023-02-17

    Duplicate of https://github.com/swig/swig/issues/1603 which is now fixed

     

Log in to post a comment.