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 @@ -67,17 +67,30 @@ private: ConnectionType connectionType_; }; +template +class BoundMethodPack +{ +public: + BoundMethodPack(const Args &... args) + : args_(args...) + { + } + + std::tuple::type...> args_; +}; + template class BoundMethodArgs : public BoundMethodBase { -private: - using PackType = std::tuple::type...>; +public: + using PackType = BoundMethodPack; +private: template void invokePack(void *pack, BoundMethodBase::sequence) { PackType *args = static_cast(pack); - invoke(std::get(*args)...); + invoke(std::get(args->args_)...); delete args; } @@ -98,7 +111,7 @@ template class BoundMemberMethod : public BoundMethodArgs { public: - using PackType = std::tuple::type...>; + using PackType = typename BoundMethodArgs::PackType; BoundMemberMethod(T *obj, Object *object, void (T::*func)(Args...), ConnectionType type = ConnectionTypeAuto)