| 7 | |
| 8 | template <typename T, int startIndex> |
| 9 | class Array |
| 10 | { |
| 11 | public: |
| 12 | explicit Array(size_t size); // Constructor |
| 13 | ~Array(); // Destructor |
| 14 | Array(const Array& array); // Copy constructor |
| 15 | Array& operator=(const Array& rhs); // Assignment operator |
| 16 | void swap(Array& other) noexcept; // noexcept swap() function |
| 17 | T& operator[](int index); // Subscript operator |
| 18 | const T& operator[](int index) const; // Subscript operator-const arrays |
| 19 | size_t getSize() const { return m_size; } // Accessor for size |
| 20 | |
| 21 | private: |
| 22 | T* m_elements; // Array of type T |
| 23 | size_t m_size; // Number of array elements |
| 24 | }; |
| 25 | |
| 26 | // Constructor template |
| 27 | template <typename T, int startIndex> |
nothing calls this directly
no outgoing calls
no test coverage detected