microsoft / cppgraphqlgen

C++ GraphQL schema service generator
MIT License
325 stars 45 forks source link

fix: schema input type member default init error on clang 14 #310

Closed wravery closed 1 month ago

wravery commented 1 month ago

The same issue exists in the schema input types as in the client input types, although I never actually saw that with any of the schema samples.

The error I saw once with clang 14 on an Ubuntu 22.04 derived image (Pop OS!, specifically) had to do with not having a constructor for nested input type members available in the header when compiling the default member initializers using {} at the end of the member declaration. Since we've already pulled the default constructor for the type itself into the source file to fix ODR violations, it makes sense to move the default member initialization into the constructor's initializer list.