[v1] libcamera: controls: Arrays of arrays are not supported
diff mbox series

Message ID 20250422124401.29968-1-barnabas.pocze@ideasonboard.com
State New
Headers show
Series
  • [v1] libcamera: controls: Arrays of arrays are not supported
Related show

Commit Message

Barnabás Pőcze April 22, 2025, 12:44 p.m. UTC
Arrays of arrays, even arrays of strings, are not supported by
the current `ControlValue` mechanism, so disable them for now
to trigger comptime errors if attempts are made to use them.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
---
 include/libcamera/controls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 326452540..427517a02 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -121,7 +121,7 @@  struct control_type<Point> {
 };
 
 template<typename T, std::size_t N>
-struct control_type<Span<T, N>> : public control_type<std::remove_cv_t<T>> {
+struct control_type<Span<T, N>, std::enable_if_t<control_type<std::remove_cv_t<T>>::size == 0>> : public control_type<std::remove_cv_t<T>> {
 	static constexpr std::size_t size = N;
 };