Hello,
I'm encountering an issue with member variables not being initialised properly after moving from GCC to Clang. I managed to boil it down to the following minimal example:
template <typename T>
struct A{
int x = 10;
};
template <typename T>
struct B{
A<T> a;
};
template <typename T>
A<T> a;
template <typename T>
auto aa = a<T>;
template <typename T>
B<T> b = {
aa<T>
};
int main(){
return b<float>.a.x;
}
Same example on the compiler explorer
I'm expecting it to return 10 (which GCC does) but Clang returns 0
Best regards!
Jonas