Is there some g++ option which shows what classes are created from templates? For example there is template definition in original source code:
template <class T>
struct SomeStruct { T variable; };
SomeStruct<int> instance;
and I would like to see implementation of SomeStruct< int>.
You can get that info with the
-fdump-class-hierarchyflag. It’ll list a lot more than you’re asking for, but if search for lines that start withClass, you’ll find what you’re looking for.EDIT: Here’s some output from a program that includes
iostream. You can see there are instantiations ofcharandwchar_t: