diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-10-23 08:15:53 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-10-23 08:15:53 +1100 |
| commit | dfc11d1c43b898394df8fda52a8079b34058de27 (patch) | |
| tree | 8d1923461be03b1d0eab5706740d22986a86997d /src/constexpr_utils.hh | |
| parent | e399bf7562475c92f4f9e983d2261c12903072d4 (diff) | |
Refactor Hook management to have a well defined list of hooks
Hooks are now an enum class instead of passing strings around.
Diffstat (limited to 'src/constexpr_utils.hh')
| -rw-r--r-- | src/constexpr_utils.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/constexpr_utils.hh b/src/constexpr_utils.hh index b0d5643f..d9ba2abb 100644 --- a/src/constexpr_utils.hh +++ b/src/constexpr_utils.hh @@ -18,6 +18,10 @@ struct Array constexpr const T* begin() const { return m_data; } constexpr const T* end() const { return m_data+N; } + constexpr T& operator[](int i) { return m_data[i]; } + constexpr T* begin() { return m_data; } + constexpr T* end() { return m_data+N; } + constexpr operator ArrayView<T>() { return {m_data, N}; } constexpr operator ConstArrayView<T>() const { return {m_data, N}; } |
