[cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-17 Thread Jaroslav Zeman via cfe-users
Hello, I've run into wieird problem when trying to compile and link our programs with clang++ on linux instead of g++. It occurs, when: - template class member definitions are separated from the definition of the class - no explicit instantiation is done - member definitions are available only

Re: [cfe-users] Linking problem with implicit instantiation of constructor/destructor

2020-04-19 Thread Jaroslav Zeman via cfe-users
> > What happens if you change the order of the .cpp files, putting > template.cpp first; is it stil unresolved? > > clang++ -o test template.cpp main.cpp The order doesn't matter. > I don't believe this code is valid according to C++. I believe it would > require an explicit instantiation of t