summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-03-19 12:31:37 +0100
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-04-25 18:06:05 +0200
commit72c3deffbb6062713c1ba043a9b249445d65dcaf (patch)
tree88c21958eda0caa7847487baa5ef9f6a57a1d18f
parent3569fed7afc16fe31dfbccbfbaeb72a741bc8973 (diff)
libcamera: controls: Disallow arrays of arraysHEADmaster
Arrays of arrays, even arrays of strings, are not supported by the current `ControlValue` mechanism, so disable them for now to trigger compile time errors if attempts are made to use them. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--include/libcamera/controls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 4bfe9615..2ae4ec3d 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -120,7 +120,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;
};