diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/base/utils.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h index 07685045..52301254 100644 --- a/include/libcamera/base/utils.h +++ b/include/libcamera/base/utils.h @@ -16,6 +16,7 @@ #include <string> #include <string.h> #include <sys/time.h> +#include <type_traits> #include <utility> #include <vector> @@ -84,7 +85,8 @@ std::basic_ostream<char, std::char_traits<char>> & operator<<(std::basic_ostream<char, std::char_traits<char>> &stream, const _hex &h); #endif -template<typename T> +template<typename T, + std::enable_if_t<std::is_integral<T>::value> * = nullptr> _hex hex(T value, unsigned int width = 0); #ifndef __DOXYGEN__ |