hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.39k stars 232 forks source link

Bugfix: lowering of variadic templates of functions #905

Closed MaxSagebaum closed 7 months ago

MaxSagebaum commented 8 months ago

Resolves #875

Minimal example: https://cpp2.godbolt.org/z/1bGGanfnr

x: <Ts...: type> type = { 
    func: () = {}
}

Error:

main.cpp2:2:36: error: qualifier contains unexpanded parameter pack 'Ts'
    2 |     template <typename ...Ts> auto x<Ts>::func() -> void{}
      |                                    ^

Correct code:

 template <typename ...Ts> auto x<Ts...>::func() -> void{}
JohelEGP commented 8 months ago

Please, edit the opening comment with "Resolves #875".

hsutter commented 7 months ago

Thanks!