Clion autocomplete does not work with forward declaration. Follow
I have a very simple project structure that has two class Big and Small in header file: big.h and small.h. Here are their code:
Big.h:
#include "small.h"
template<int N>
class Big {
public:
int big_data;
Big() {
}
};
Small.h:
template<int N>
class Big;
template<int N>
class Big;
template<int N>
class Small {
public:
int small_data;
Small() {
}
void get_back_end_data(Big<N> *big) {
}
};
Small has a function that take a Big object as an argument. The problem is that in the body of that function, autocomplete does not give me the public big_data.
If I directly include "big.h" inside small.h, it'd work. But my actual project requires predeclaring class Big inside small.h. There's no reason this shouldn't work, right?
Please sign in to leave a comment.