summaryrefslogtreecommitdiff
path: root/src/array_view.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-11-11 21:43:27 +1100
committerMaxime Coste <mawww@kakoune.org>2021-11-21 09:44:56 +1100
commitfb4cef5b61639c507e6c5740cc5973d0d79ba673 (patch)
tree751e533a39d9a51be6b8af9e4abe6af75df00e87 /src/array_view.hh
parent04f11c2af3e0ecdc78df9800d381b2fdc46af3b7 (diff)
Replace std::enable_if with requires
Introduce some concepts for enum and flags handling, goodbye and thanks for all the fish std::enable_if.
Diffstat (limited to 'src/array_view.hh')
-rw-r--r--src/array_view.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/array_view.hh b/src/array_view.hh
index 6a363656..982b436f 100644
--- a/src/array_view.hh
+++ b/src/array_view.hh
@@ -30,8 +30,8 @@ public:
template<size_t N>
constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {}
- template<typename Container,
- typename = std::enable_if_t<sizeof(decltype(*std::declval<Container>().data())) == sizeof(T)>>
+ template<typename Container>
+ requires (sizeof(decltype(*std::declval<Container>().data())) == sizeof(T))
constexpr ArrayView(Container&& c)
: m_pointer(c.data()), m_size(c.size()) {}