diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-05-14 19:05:41 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-05-14 19:05:41 +0100 |
| commit | e9af3a4217843974c1e9c89bb8ddcfee44216c9e (patch) | |
| tree | 6a3655c08035c92259e060c75ace560b9c750aca /src/array_view.hh | |
| parent | 8ba68044809d6fc0bc34eae44f7ff0a855463d1a (diff) | |
always_inline a few methods
Diffstat (limited to 'src/array_view.hh')
| -rw-r--r-- | src/array_view.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/array_view.hh b/src/array_view.hh index 922cd99a..33ae8979 100644 --- a/src/array_view.hh +++ b/src/array_view.hh @@ -44,6 +44,8 @@ public: constexpr T* pointer() const { return m_pointer; } constexpr size_t size() const { return m_size; } + + [[gnu::always_inline]] constexpr T& operator[](size_t n) const { return *(m_pointer + n); } constexpr T* begin() const { return m_pointer; } |
