Hmm, I would think this might happen when using generics. Languages like Java, C++ generate code for you based on the generics you input. For C++, the generics are generated based on usage (i.e. if you ever create MyClass<T> and use it somewhere as MyClass<int> and MyClass<bool> and compile the library to a shared object, it will only be available via dynamic linking as those two types and no other).
View all comments
Show parent comment
2
u/[deleted] Oct 29 '19
Hmm, I would think this might happen when using generics. Languages like Java, C++ generate code for you based on the generics you input. For C++, the generics are generated based on usage (i.e. if you ever create MyClass<T> and use it somewhere as MyClass<int> and MyClass<bool> and compile the library to a shared object, it will only be available via dynamic linking as those two types and no other).