Open tiagomacarios opened 1 year ago
This change makes sense and should be backward compatible to C++11 as well. Feel free to submit a PR with the changes to code generation.
Does S::S() {}
need to be marked inline
as it won't be inside a class definition?
yes it will need inline. I am not familiar with Haskell, nor do I have an environment set. I presume this is a simple change, could you author it? This is currently blocking us. If you prefer I can create an internal bug on you team - just provide me the correct area path.
Bond generates code as follows: https://godbolt.org/z/a4qnbcjeh
But this does not work in C++20 (in clang) because the constructor will be instantiated with the forward declaration and compilation will fail.
A possible fix is to move the constructor body until after all entities have bee fully defined: https://godbolt.org/z/6YjarYx3c
Office is currently hitting this when trying to update to C++20.