Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
| #include <iostream> | |
| #include <array> | |
| #include <cstring> | |
| template<typename T, size_t S> | |
| class Array { | |
| public: | |
| constexpr size_t size() const {return S;} | |
| T& operator[](size_t index){return m_Data[index];} | |
| const T& operator[](size_t index) const {return m_Data[index];} | |
| T* Data(){return m_Data;} |
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df