fork download
  1. #include <iostream>
  2. #include <array>
  3.  
  4. struct SC
  5. {
  6. static SC const FIVE;
  7. std::size_t row, column;
  8. };
  9.  
  10. constexpr SC const SC::FIVE{ 5, 5 };
  11.  
  12. int main(int, char**) noexcept
  13. {
  14. std::array<int, SC::FIVE.row> row_arr{};
  15. std::array<int, SC::FIVE.column> col_arr{};
  16. std::cout << "rows: " << row_arr.size() << "\ncols: " << col_arr.size();
  17. return 0;
  18. }
Success #stdin #stdout 0s 4572KB
stdin
Standard input is empty
stdout
rows: 5
cols: 5