fork(3) download
  1. #include <array>
  2. #include <string>
  3.  
  4. template<typename T>
  5. struct array_size;
  6.  
  7. template<size_t N, typename T>
  8. struct array_size<std::array<T, N>>
  9. {
  10. enum { value = N };
  11. };
  12.  
  13. int main(void)
  14. {
  15. std::array<std::string, 42> a1;
  16. std::array<int, array_size<decltype(a1)>::value> a2;
  17. }
  18.  
Success #stdin #stdout 0s 2892KB
stdin
Standard input is empty
stdout
Standard output is empty