summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/Doxyfile.in1
-rw-r--r--include/libcamera/bound_method.h21
2 files changed, 18 insertions, 4 deletions
diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in
index 840c1b4c..9e5efae3 100644
--- a/Documentation/Doxyfile.in
+++ b/Documentation/Doxyfile.in
@@ -873,6 +873,7 @@ EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS = libcamera::BoundMemberMethod \
libcamera::BoundMethodArgs \
libcamera::BoundMethodBase \
+ libcamera::BoundMethodPack \
libcamera::BoundStaticMethod \
libcamera::SignalBase \
std::*
diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h
index 9fd58c69..d194cd41 100644
--- a/include/libcamera/bound_method.h
+++ b/include/libcamera/bound_method.h
@@ -68,16 +68,29 @@ private:
};
template<typename... Args>
+class BoundMethodPack
+{
+public:
+ BoundMethodPack(const Args &... args)
+ : args_(args...)
+ {
+ }
+
+ std::tuple<typename std::remove_reference<Args>::type...> args_;
+};
+
+template<typename... Args>
class BoundMethodArgs : public BoundMethodBase
{
-private:
- using PackType = std::tuple<typename std::remove_reference<Args>::type...>;
+public:
+ using PackType = BoundMethodPack<Args...>;
+private:
template<int... S>
void invokePack(void *pack, BoundMethodBase::sequence<S...>)
{
PackType *args = static_cast<PackType *>(pack);
- invoke(std::get<S>(*args)...);
+ invoke(std::get<S>(args->args_)...);
delete args;
}
@@ -98,7 +111,7 @@ template<typename T, typename... Args>
class BoundMemberMethod : public BoundMethodArgs<Args...>
{
public:
- using PackType = std::tuple<typename std::remove_reference<Args>::type...>;
+ using PackType = typename BoundMethodArgs<Args...>::PackType;
BoundMemberMethod(T *obj, Object *object, void (T::*func)(Args...),
ConnectionType type = ConnectionTypeAuto)