Fix build with type aliases and generated .cpp files

These need to remain in the header file
This commit is contained in:
Simon Hausmann 2024-08-19 18:24:43 +02:00 committed by Simon Hausmann
parent 4b2d572732
commit 8146799e8a

View file

@ -102,11 +102,15 @@ mod cpp_ast {
let mut i = 0;
while i < self.definitions.len() {
if matches!(&self.definitions[i], Declaration::Function(fun) if fun.template_parameters.is_some())
{
if matches!(
&self.definitions[i],
Declaration::Function(Function { template_parameters: Some(..), .. })
| Declaration::TypeAlias(..)
) {
i += 1;
continue;
}
definitions.push(self.definitions.remove(i));
}