summaryrefslogtreecommitdiff
path: root/include/libcamera/controls.h
diff options
context:
space:
mode:
authorJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>2021-01-26 14:04:14 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-31 17:52:07 +0200
commit33bfe7b7ef68d6221ad340ad117815e30f8fe6aa (patch)
tree0c7a4a8025ac54bdca3427f6b8c3c5b447108ccb /include/libcamera/controls.h
parent3809fd77463f8f9f30d8da56fc3b103c683fba72 (diff)
Revert "libcamera: span: Provide and use helper variable templates for type traits"
Some applications may not be compliant with C++17 (Chromium, as an example). Keep the C++17 features for libcamera internals, and C++14 compliance for public API. This reverts commit 8e42c2feb7ff7c350ffbbf97dd963dfd54e21faa. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/libcamera/controls.h')
-rw-r--r--include/libcamera/controls.h12
1 files changed, 6 insertions, 6 deletions
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<typename T, typename std::enable_if_t<!details::is_span_v<T> &&
+ template<typename T, typename std::enable_if_t<!details::is_span<T>::value &&
details::control_type<T>::value &&
!std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
@@ -107,7 +107,7 @@ public:
&value, 1, sizeof(T));
}
- template<typename T, typename std::enable_if_t<details::is_span_v<T> ||
+ template<typename T, typename std::enable_if_t<details::is_span<T>::value ||
std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
#else
@@ -141,7 +141,7 @@ public:
}
#ifndef __DOXYGEN__
- template<typename T, typename std::enable_if_t<!details::is_span_v<T> &&
+ template<typename T, typename std::enable_if_t<!details::is_span<T>::value &&
!std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
T get() const
@@ -152,7 +152,7 @@ public:
return *reinterpret_cast<const T *>(data().data());
}
- template<typename T, typename std::enable_if_t<details::is_span_v<T> ||
+ template<typename T, typename std::enable_if_t<details::is_span<T>::value ||
std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
#else
@@ -169,7 +169,7 @@ public:
}
#ifndef __DOXYGEN__
- template<typename T, typename std::enable_if_t<!details::is_span_v<T> &&
+ template<typename T, typename std::enable_if_t<!details::is_span<T>::value &&
!std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
void set(const T &value)
@@ -178,7 +178,7 @@ public:
reinterpret_cast<const void *>(&value), 1, sizeof(T));
}
- template<typename T, typename std::enable_if_t<details::is_span_v<T> ||
+ template<typename T, typename std::enable_if_t<details::is_span<T>::value ||
std::is_same_v<std::string, std::remove_cv_t<T>>,
std::nullptr_t> = nullptr>
#else