| 4 | // Class Template |
| 5 | template<typename T> |
| 6 | class MyVector |
| 7 | { |
| 8 | size_t length; |
| 9 | T * data; |
| 10 | public: |
| 11 | MyVector(size_t length): length(length) |
| 12 | { |
| 13 | data = new T[length]{}; |
| 14 | } |
| 15 | ~MyVector() |
| 16 | { |
| 17 | delete [] data; |
| 18 | } |
| 19 | MyVector(const MyVector&) = delete; |
| 20 | MyVector& operator=(const MyVector&) = delete; |
| 21 | T getElement(size_t index); |
| 22 | bool setElement(size_t index, T value); |
| 23 | }; |
| 24 | template <typename T> |
| 25 | T MyVector<T>::getElement(size_t index) |
| 26 | { |
nothing calls this directly
no outgoing calls
no test coverage detected