From fb4cef5b61639c507e6c5740cc5973d0d79ba673 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 11 Nov 2020 21:43:27 +1100 Subject: Replace std::enable_if with requires Introduce some concepts for enum and flags handling, goodbye and thanks for all the fish std::enable_if. --- src/array_view.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/array_view.hh') 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 constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {} - template().data())) == sizeof(T)>> + template + requires (sizeof(decltype(*std::declval().data())) == sizeof(T)) constexpr ArrayView(Container&& c) : m_pointer(c.data()), m_size(c.size()) {} -- cgit v1.2.3