This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Description
Bond generates code as follows:
https://godbolt.org/z/a4qnbcjeh
#include <vector>
struct forward_decl;
struct S{
std::vector <forward_decl> m;
S(){};
};
struct forward_decl{};
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
#include <vector>
struct forward_decl;
struct S {
std::vector<forward_decl> m;
S();
};
struct forward_decl {};
inline S::S() {}
Office is currently hitting this when trying to update to C++20.