fork download
  1. #include <stdio.h>
  2.  
  3. template <typename T>
  4. struct A
  5. {
  6. static float m_kA[];
  7. };
  8.  
  9. template <typename T>
  10. float A<T>::m_kA[] = {1.0f, 2.0f};
  11.  
  12. int main()
  13. {
  14. printf("%d\n",
  15. sizeof(A<unsigned int>::m_kA) /
  16. sizeof(A<unsigned int>::m_kA[0]));
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
2