mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 17:35:06 +03:00
Revert "libcamera: Use helper variable template 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 6cbdc28599
.
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>
This commit is contained in:
parent
33bfe7b7ef
commit
c763ae023d
5 changed files with 34 additions and 34 deletions
|
@ -98,7 +98,7 @@ public:
|
|||
#ifndef __DOXYGEN__
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
ControlValue(const T &value)
|
||||
: type_(ControlTypeNone), numElements_(0)
|
||||
|
@ -108,7 +108,7 @@ public:
|
|||
}
|
||||
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
#else
|
||||
template<typename T>
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
|
||||
#ifndef __DOXYGEN__
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
T get() const
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ public:
|
|||
}
|
||||
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
#else
|
||||
template<typename T>
|
||||
|
@ -170,7 +170,7 @@ public:
|
|||
|
||||
#ifndef __DOXYGEN__
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
void set(const T &value)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ public:
|
|||
}
|
||||
|
||||
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::is_same<std::string, std::remove_cv_t<T>>::value,
|
||||
std::nullptr_t> = nullptr>
|
||||
#else
|
||||
template<typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue