diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index 3634dc43..dc549a92 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -96,7 +96,7 @@ public: ControlValue(); #ifndef __DOXYGEN__ - template && + template::value && details::control_type::value && !std::is_same_v>, std::nullptr_t> = nullptr> @@ -107,7 +107,7 @@ public: &value, 1, sizeof(T)); } - template || + template::value || std::is_same_v>, std::nullptr_t> = nullptr> #else @@ -141,7 +141,7 @@ public: } #ifndef __DOXYGEN__ - template && + template::value && !std::is_same_v>, std::nullptr_t> = nullptr> T get() const @@ -152,7 +152,7 @@ public: return *reinterpret_cast(data().data()); } - template || + template::value || std::is_same_v>, std::nullptr_t> = nullptr> #else @@ -169,7 +169,7 @@ public: } #ifndef __DOXYGEN__ - template && + template::value && !std::is_same_v>, std::nullptr_t> = nullptr> void set(const T &value) @@ -178,7 +178,7 @@ public: reinterpret_cast(&value), 1, sizeof(T)); } - template || + template::value || std::is_same_v>, std::nullptr_t> = nullptr> #else diff --git a/include/libcamera/span.h b/include/libcamera/span.h index e7ffef12..d720adb8 100644 --- a/include/libcamera/span.h +++ b/include/libcamera/span.h @@ -31,9 +31,6 @@ template struct is_array> : public std::true_type { }; -template -inline constexpr bool is_array_v = is_array::value; - template struct is_span : public std::false_type { }; @@ -42,9 +39,6 @@ template struct is_span> : public std::true_type { }; -template -inline constexpr bool is_span_v = is_span::value; - } /* namespace details */ namespace utils { @@ -161,8 +155,8 @@ public: template explicit constexpr Span(Container &cont, - std::enable_if_t && - !details::is_array_v && + std::enable_if_t::value && + !details::is_array::value && !std::is_array_v && std::is_convertible_v (*)[], element_type (*)[]>, @@ -173,8 +167,8 @@ public: template explicit constexpr Span(const Container &cont, - std::enable_if_t && - !details::is_array_v && + std::enable_if_t::value && + !details::is_array::value && !std::is_array_v && std::is_convertible_v (*)[], element_type (*)[]>, @@ -323,8 +317,8 @@ public: template constexpr Span(Container &cont, - std::enable_if_t && - !details::is_array_v && + std::enable_if_t::value && + !details::is_array::value && !std::is_array_v && std::is_convertible_v (*)[], element_type (*)[]>, @@ -335,8 +329,8 @@ public: template constexpr Span(const Container &cont, - std::enable_if_t && - !details::is_array_v && + std::enable_if_t::value && + !details::is_array::value && !std::is_array_v && std::is_convertible_v (*)[], element_type (*)[]>,