fork(2) download
  1. #include <iostream>
  2. #include <array>
  3.  
  4. template<typename T, std::size_t ... dimensions>
  5. class matrix
  6. {
  7. public:
  8. static constexpr std::size_t size()
  9. {
  10. return 12;
  11. }
  12. matrix() : rows(0), cols(0) {}
  13. ~matrix() {};
  14. private:
  15. std::array<T, size()> data;
  16. size_t rows, cols;
  17. };
  18.  
  19. int main() {
  20. matrix <int, 2, 3>m;
  21. return 0;
  22. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty