fork(1) download
  1. #include <iostream>
  2.  
  3. template <int SS> struct sizeof_struct { char a__[SS]; };
  4.  
  5. template <typename T, int Size>
  6. inline sizeof_struct<Size> count_of_array(T (&a)[Size]) {}
  7. template <typename Type>
  8. inline void func()
  9. {
  10. // enum { c = __PRETTY_FUNCTION__[0] };
  11. }
  12. int main()
  13. {
  14. static_assert(sizeof(count_of_array(__PRETTY_FUNCTION__)) == 11, "It is not a compiletime array");
  15. func<int>();
  16. }
Success #stdin #stdout 0s 4264KB
stdin
Standard input is empty
stdout
Standard output is empty