17 lines · cpp
1// Forward declare a template and a specialization;2template <typename T> class Temp;3template <> class Temp<int>;4 5// Force that debug informatin for the specialization is emitted.6// Clang and GCC will create debug information that lacks any description7// of the template argument 'int'.8Temp<int> *a;9 10// Define the template and create an implicit instantiation.11template <typename T> class Temp { int f; };12Temp<float> b;13 14int main() {15 return 0; // break here16}17